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 …
Learning
-
-
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 …
-
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 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() …
-
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 …
-
Another simple example is to hook up a speaker to your Arduino. Schematic Layout Code A simple example. [c] int pin = 8; int note = 988; void setup() { } void loop() { //3 dots …
-
In this example we will show a basic example of connecting a DHT11 Temperature and Humidity Sensor to your Arduino. This is a very nice little, low cost sensor which requires only a pull up resistor to VDD. This can …