Base Code - richar66/FlexSensors-Midterm GitHub Wiki
The base code used for this project was simply to read in the changing resistance through the changing voltage. The code can be seen below. It includes a mapping to make the range of voltage inputs on the serial monitor lower but this can also be achieved by using a smaller resistance, like 2k ohms, rather than something higher like 10k ohms which is used with the base code example. Voltage divider is the key to using this set up so depending on the input voltage for each sensor different resistors can be used for different circuits.
My project doesn't use the mapping and only uses the method of reading in the changing voltage and printing the voltage on the serial monitor. Everything else in the code is original and can be seen on the code page or the actual Arduino file is here.
The use of this code can be seen here in my testing file as well as at the start of my final code. The testing is used to figure out what threshold values to use to determine if a finger is bent or not.
Citation: [2]"bildr ยป Sensing A Bend With A Flex Sensor + Arduino", bildr, 2012. [Online]. Available: http://bildr.org/2012/11/flex-sensor-arduino/. [Accessed: 18- Feb- 2016].