Newspaper Counter Exercise

In this exercise, you will use the capacitive sensor to count the number of times a newspaper box has been opened. When it has been opened a certain number of times, a coupon will be dispensed. A RGB LED will act as a signal for when this happens. (Later, if you want, you can on your own to add a servo to make an actual dispenser.) The certain number provided by the Central Yún.

Materials

  • Arduino Yún
  • Jumper wires
  • 10k resistor  (The colors on it are brown , black, orange and gold)
  • Long wire
  • Tin foil
  • Breadboard

 

Newspaper1.jpg

  1. Insert wire through hole in door and wrap around handle – secure with copper tape
  2. Open the “e5_coupon_dispenser” from the examples
  3. Upload the sketch to the Yún
  4. When the onboard LED L13 is on, the Yún is ready.
  5. Open the Serial Monitor and test the sensor by opening and closing the newspaper box. Check the Central Yún ’s serial monitor to see all the saved values.
  6. Go to this URL: http://verkstad.cc/iot/mmx/4/index.php to see current state of the coupon dispenser.