Connected Devices

Week 1: Prototyping with Arduino

This week, we’ll be covering the basics of building interactive prototypes using Arduino. We’ll be using the Adafruit Budget Pack for Arduino, which includes an Arduino Uno, a breadboard, wires, and some simple components.

Download: Arduino 1.6.0 (or newer)

Outline

RGB LED Pin Out

RGB LED
5mm diffused common-anode RGB LEDs.

TMP36 Example Arduino Sketch

void setup(void)
{
  Serial.begin(9600);
}

void loop(void)
{
  int sensorValue = analogRead(A0);
  int voltage = map(sensorValue, 0, 1024, 0, 5000); // in mV (i.e. 5000 is 5V)
  float celsius = map(voltage, 750, 1000, 250, 500) / 10.0; // 750 mV is 25C
  float farenheit = celsius * 9 / 5 + 32;
  Serial.println(farenheit);
  delay(1000);
}

Introduction to Physical Computing

physicalcomputing
Download PDF.

Resources

Leave a Reply