Goal:
The goal of this project was to create a prototype that would simulate the behavior of the type of circuit that when embedded in a car windshield or roof could alert the user that ice or snow had accumulated.
Process Documentation:
The first thing I did for this project was look at the code that would be needed to create this type of circuit. I used the code found provided by daraghbyrne on his GitHub for our class as the building blocks for this project. I started by copying the code that would be needed for to get data from the force sensor and the temperature sensor (in 4. Basics of Sensors there is code for each of the sensors listed in the BOM below). I updated the code so that the temperature sensor would be communicating with A1 and the force would be communicating with A0. Then from the force sensor code, I also pulled the code necessary to output to an LED that is connected to D0 and for that LED's brightness to vary with the output from the force sensor. I then added my own if statement to the void loop that imitated conditions as if there were snow or ice on the car and only when those conditions were true, would the LED light up. I set the temperature threshold to be freezing and the force threshold to be light pressure. The correct force reading would really need to be calibrated based on real world application, but this was sufficient for demonstration. Below is the if statement that I added to the code: