• This DS18B20 example we output the temperature to our LCD display. The LCD display we use is the LCD Keypad Shield that is available for sale from various sources. Here is the temperature displayed on the LCD, as you can …

  • Basics

    Transistor example

    by shedboy71

    The circuit shown here uses a NPN transistor connected to a an Arduino output pin to switch an LED pin. In real life you would perhaps switch a relay, lamp , fan or a buzzer. A darlington transistor could be …

  • Ultrasonic transducers or ultrasonic sensors are a type of acoustic sensor divided into three broad categories: transmitters, receivers and transceivers. Transmitters convert electrical signals into ultrasound, receivers convert ultrasound into electrical signals, and transceivers can both transmit and receive ultrasound. …

  • Code

    8×8 LED matrix example

    by shedboy71

    This example switches on all the LEDs on a 8×8 LED matrix, the matrix is controlled by a MAX7219 You will need the Led Control library #include “LedControl.h” /* Max7219_pinCLK = 10; Max7219_pinCS = 9; Max7219_pinDIN = 8; */ LedControl …

  • Basics

    PIR sensor example

    by shedboy71

    In the following example we will demonstrate the HC-SR501 PIR sensor, this sensor has many nice features including the ability to be driven by 5v, low cost (£2 to £3), it has a decent range (7 metres) and a fairly small size. These …

  • Code

    Fading LED

    by shedboy71

    Connect an LED to digital pin 3 Code [c] void setup() { pinMode(3, OUTPUT); } void loop() { for (int a = 0 ; a < 256 ; a++) { analogWrite(3, a); delay(5); } for (int a = 255 ; …

  • Basics

    Connecting a reed switch

    by shedboy71

    A reed switch is a small device that when the device is exposed to a magnetic field, the two materials inside the switch pull together and the switch closes. When the magnetic field is removed, the two materials then separate …

  • This example shows how to interface a basic touch sensor to our arduino, this sensor came as part of a kit of 37 sensors. Touching the metal sensor pin produces an output at the ‘DO’ pin. The output is not …

  • Basics

    Creating a library

    by shedboy71

    In this example we will create a basic library, a few examples on this site flash LEDs. We will create a library that will contain a couple of functions, we will then use these in our sample sketch. You need …

  • Code

    BMP085 example

    by shedboy71

    This example uses the BMP05 Barometric, pressure and Temperature sensor. It requires the BMP085 library from adafruit. This is a nice little sensor.   [c] #include <Wire.h> #include <Adafruit_BMP085.h> Adafruit_BMP085 bmp; void setup() { Serial.begin(9600); if (!bmp.begin()) { Serial.println(“Could not …

  • BasicsCode

    RGB LED example

    by shedboy71

    This was a quick test for a multi color LED. Pins 2, 3 and 4 were used   [c] int red = 2; int green =3; int blue =4; int j; void setup() { pinMode(red,OUTPUT); pinMode(green,OUTPUT); pinMode(blue,OUTPUT); } void loop() …

  • random LEDs on using the LOLShield and an Arduino   Switch LEDS off and on by column [c] #include <Charliplexing.h> void setup() { LedSign::Init(); // initializes the screen } void loop() { for (int x=0; x<14; x++) { for (int …