3. Why ?
• open-source project
• flexible to be customized and extended
• easy to use for beginners
• inexpensive (around 40$)
• strong online community
• lots of free source code
10. example
int buttonPin = 3;
void setup()
{
Serial.begin(9600);
pinMode(buttonPin, INPUT);
}
void loop()
{
// ...
}
11. example
// loop checks the button pin each time,
// and will send serial if it is pressed
void loop()
{
if (digitalRead(buttonPin) == HIGH)
Serial.write('H');
else
Serial.write('L');
delay(1000);
}
12. Demos
/ 1. Temperature - Humidity Sensor DHT-11
/ 2. Sharp IR Proximity Sensor
/ 3. Bluetooth Module HC-06
15. Temperature & Humidity Sensor (DHT11)
• Good for 20-80% humidity readings with 5% accuracy
• Good for 0-50°C temperature readings ±2°C accuracy
• 4 pins with 0.1" spacing (VCC, GND, Data Out)
• 3 to 5V power and I/O