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 ; …
-
-
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 …
-
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 …
-
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 …
-
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 …
-
The LoL Shield is a charlieplexed LED matrix for the Arduino. The LEDs are individually addressable, so you can use it to display anything in a 9×14 grid. Scroll text, play games, display images, or anything else you want to …
-
The Colour LCD Shield provides an easy method of connecting the popular Nokia 6100 LCD to your Arduino. The board comes as shown with the 128×128 mini colour LCD, as well as a backlight driver circuit (boosts to 7V), and three momentary push-buttons (tied …
-
This example shows how to connect a joystick to your Arduino. This could be used for games or perhaps navigating through a menu for example. This is a basic analog 2-axis joystick which has two 10K ohm pots for vertical and …
-
In this example we connect a photoresistor to an Arduino, the value read from the photoresistor corresponds to the amount of light present. The photoresistor is connected to analog pin 0 in this example. A photoresistor (or light-dependent resistor, LDR, or photo-conductive cell) is a …
-
An RGB led is a combination of a Red, Green and Blue LED’s in one package, they can be common cathode or common anode types In the example I used an RGB LED breakout. The LED was wired up as …