erbth / switches_and_leds

A few buttons on a µC (ATtiny44 but doesn't matter) using interesting creative approaches from all over the place.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A few buttons and LEDs

I tried it, too. Many did before. To connect a few buttons to a µC with an ADC on one pin, and the button-in-parallel-to-LED magic (two in this case). This makes one pin for a 4x dip switch + another two pins for two LEDs and one button.

Thanks to the guys from mikrocontroller.net for the idea and Peter Dannegger for trying it before me (he came up with the analog comparator approach, I think). Have a look at their forum, they have incredible stuff there (i.e. Peter's key debounce routine): https://www.mikrocontroller.net/topic/77617 , https://www.mikrocontroller.net/topic/77863 .

The ADC approach can actually be found all over the place ;-) . I did a small python script for computing the resistors, feel free to use it (sorry I did not assign a license or something, just too lazy ...).

- Thomas Erbesdobler t.erbesdobler@gmx.de

About

A few buttons on a µC (ATtiny44 but doesn't matter) using interesting creative approaches from all over the place.


Languages

Language:Makefile 53.9%Language:Assembly 27.6%Language:Python 18.4%