In this exercise, you will use the flex sensor to build a simple wind strength sensor. If the sensor detects a strong wind for a specific duration, the signal (RGB LED) will turn red. Once the wind lets up, the signal will turn green. The threshold 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)
- Flex sensor
- Breadboard
- Construct the MDF parts to hold the flex sensor.
- Open the “e5_windstrength” 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 blowing on it for a few seconds. Check the Central Yún ’s serial monitor to see all the saved values.
- Go to this URL: http://verkstad.cc/iot/mmx/3/index.php to see current state of the wind strength sensor.
- Modify thresholdValue to see how changing it affects how much wind is needed to trigger the sensor.