| Copyright | (c) Levent Erkok |
|---|---|
| License | BSD3 |
| Maintainer | erkokl@gmail.com |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
System.Hardware.Arduino.SamplePrograms.Counter
Description
Demonstrates using two push-buttons to count up and down.
Documentation
Two push-button switches, controlling a counter value. We will increment
the counter if the first one (bUp) is pressed, and decrement the value if the
second one (bDown) is pressed. We also have a led connected to pin 13 (either use
the internal or connect an external one), that we light up when the counter value
is 0.
Wiring is very simple: Up-button connected to pin 4, Down-button connected to pin 2, and a led on pin 13.
