Materials:
1 - 220 ohm resistor
1 - 10K resistor
1 - Gumdrop LED
1 - FSR or Photocell
1 - Teensy
Description:
To read analog input, we need to construct a voltage divider. This consists of the linking the analog input (FSR, photocell) in series with a resistor that equals its resistive max and connect this to Ground and +5V. A signal wire from their joint can be used to read analog values to control components e.g. an LED.
Arduino code: analogInputFade.txt
Homework-
Serial communication with Processing.
For the homework, I mapped sensor values to a range from 0 -255. Then I made a square display which background luminosity changed based on this sensor value. This is a gif of how an FSR sensor was used to control the background: GIF
Processing Code: https://courses.ischool.berkeley.edu/i262/f13/sites/default/files/SerialColor.txt
- Login to post comments