The photoresistors are constantly generating readings – it's up to the Arduino to interpret it. In order to detect a phone, we need to write an algorithm that triggers an alert when the light levels spike past a certain threshold for a certain amount of time. This requires a lot of testing in order to calibrate it to the right sensitivity. Too sensitive and it will trigger false positives; too passive and it will create false negatives. We sent the photoresistor values to the console (with Serial.print) but it was hard to see patterns in a fast-scrolling list of numbers. To find patterns more effectively, we created a Processing script that parsed the values from the Serial monitor and generated a graph. The visual format is great for understanding the sensitivity of the photoresistors.
No comments:
Post a Comment