Description:
For this lab and homework submission I got the FSR working as a voltage divider where the resistance valve read from 1023 to 0 as the FSR was squeezed. A harder squeeze dropped the value read by the analog input. Additionally I got the serial port working in Processing but kept having a serial read error where the values were not going through correctly from Arduino. A quick lesson in serial helped me realize you cannot have two objects (windows) trying to read the serial port; I had both Arduino and Processing trying to get serial values.
For the mechanical component, I wanted to build an interaction with my laptop so I placed the FSR under one of the pads on my laptop. When read in the serial port (via voltage divider and Arduino) this created a very distinguishable button on the top surface of my laptop. I image load cells in the pads of a laptop for simple buttons and interactions.
Once the serial communication was cleared up & and the FSR attached to the computer, I built my simple visualization in Processing. As a first pass looking at the serial ports I could see 4 or 5 discrete levels in a button interactions so I changed the blue shading of a circle across 4 levels.
Materials:
- Arduino Uno
- MacBook
- Jumpers
- Resistor (oops I forgot the value)
- Tape
Code:
Attached my Processing and Arduino sketches to this submission
- Login to post comments