Sensing Part 2: Force Sensitive Resistors and Photocells
Building on the potentiometer lab, where I used a millis() approach to measure the interval between write states of the LED which was as an alternative to using delay(), I decided to use this same technique of making the lights blink to influence the reading of the photoresistor, thus creating a square wave oscillation. There is two LED, thus two "oscillators".
Description:
The is a mock decision support tool to standardize fruit evaluation in different types of environments. The idea is to help human farmers make more confident judgments about fruit ripeness in multiple environments.
Description
I used the photocell to determine the color of the LEDs, which in turn are represented in my Processing program. The FSR was used to determine the size of the circle.
Materials
- [1x] Arduino Uno
- [1x] 10k Resistor
- [3x] 220 Ohm Resistors
- [1x] Force-Sensing Resistor (FSR)
- [1x] Photo-cell
- DVD + Penny + Soft Spongy Material
- Many wires.
Code
Arduino:
Description
This setup catches the attention of the user by a pulsing LED. To turn the LED off, the user has to remove the cap of the bottle. Now that the users' attention he discovers SpongeBob SquarePants lying around. The user might be intrigued when he also notices the wire coming from underneath SpongeBob. The user pushes SpongeBob and discovers the movement on the screen - "it's SpongeBob and he talks!?!"
Components used
Materials:
(2) 10k pots
(1) FSR
(1) Arduino Uno
I built a simple drawing program which resembles the popular toy "Etch-a-sketch". The program (code below) receives three sensor inputs. The first from the FSR and the other two from the pots. Processing reads in the values which are grouped and seperated by commas and ended with a newline character. The pots control the position, x and y, of a circle drawn on the screen. The FSR allows the drawer to reset the screen.
Arduino Code: