This project constitutes an FSR
sensor
(Force Sensitive Sensor), a switch for taking user input, and an LED for displaying the output.
If the switch is set to ON and the user applies force on the FSR sensor, the LED starts blinking. The speed at which the LED blinks is dependent on the amount of force being applied to the FSR sensor.
For this project, I have given 3 force ranges first force range- fsrReading greater than 50 and less than 1500, second force range-
fsrReading greater than 1500 and less than 3000, and the highest force range with fsrReading greater than 3000.
The highest force of greater than 3000 will have the fastest LED blinking rate.
This project could be used in a number of devices where the weight or force applied needs to be tracked and the user needs to be alerted if incase high force is being applied to it.
I initially started this project by exploring the various sensors present in the kit. Then I identified the use case for which I could use the FSR sensor.
I then tried using the FSR sensor and understand the readings given from the FSR sensor.
Later, As I was working with the if condition, I realized that even if I don't apply pressure, the reading is giving up some value which ideally shouldn't be the case. Due to this I had to update the if condition and take values starting 50 onwards even though no pressure is being applied from user end.
I also learned about giving range of values to perform an action using the & operand.
While experimenting with the multiple conditions, I tweaked the LED speed i.e. reduced the delay with increase in fsrReading to differentiate how much pressure is being applied.
In this project, I learnt on how I could work with two inputs. Also, I had used an Photoresistor sensor earlier, so working with the FSR sensor was new for me. This project also helped me understand the if and if else conditions and also, I learnt how to read values in between a range of values.