Crystal Wizard
- Feb 10, 2016
- 100
- Joined
- Feb 10, 2016
- Messages
- 100
UPDATE:
No debounce. No time-delay.
Hull Point LEDs work. (only using 2, for proof of concept/lack of pins)
Start = 2 LEDs on.
Press "down", hp--
Press "up" hp++
HP=2, both LEDs on.
HP = 1, one LED on
HP = 0, LEDs flash alternately, then go off (repeat)
I think Bounce is causing "one press" to be counted as "more than one press".
Doesn't help that I don't have switches, just touching jump-leads together. Will get switches/buttons soon, and debounce them.
But principle seems to work.
NEXT:
buttons/debounce. Then think about shift-registers to add Pins.
No debounce. No time-delay.
Hull Point LEDs work. (only using 2, for proof of concept/lack of pins)
Start = 2 LEDs on.
Press "down", hp--
Press "up" hp++
HP=2, both LEDs on.
HP = 1, one LED on
HP = 0, LEDs flash alternately, then go off (repeat)
I think Bounce is causing "one press" to be counted as "more than one press".
Doesn't help that I don't have switches, just touching jump-leads together. Will get switches/buttons soon, and debounce them.
But principle seems to work.
NEXT:
buttons/debounce. Then think about shift-registers to add Pins.