In this exercise, you will use the LDR to check how long a car has been parked. If it exceeds the parking time limit, the signal light will turn red. The time limit is provided by the Central Yún .
Materials:
- Arduino Yún
- Jumper wires
- 10k resistors (The colors on it are brown , black, orange and gold)
- Light Dependent Resistor (LDR)
- Breadboard
- Construct the MDF parts to hold the LDR.
- Open “e5_carparkchecker” from the examples.
- Upload the sketch to the Yún
- When the onboard LED L13 is on, the Yún is ready.
- Open the Serial Monitor and test the sensor by placing something over it. Check the Central Yún ’s serial monitor to see all the saved values.
- Go to this URL: http://verkstad.cc/iot/mmx/1/index.php to see current state of the parking signal.
- Modify thresholdValue to see how changing it affects how much light is needed to trigger the sensor.