This shows you the differences between two versions of the page.
pm:prj2025:avaduva:george_matei.popa [2025/06/01 19:06] george_matei.popa [Introducere] |
pm:prj2025:avaduva:george_matei.popa [2025/06/01 19:09] (current) george_matei.popa [Software Design] |
||
---|---|---|---|
Line 60: | Line 60: | ||
* LCD keypad shield (x1) | * LCD keypad shield (x1) | ||
* Buzzer (x1) | * Buzzer (x1) | ||
+ | * NPN transistor | ||
+ | * 1k ohm resistor | ||
* Switch | * Switch | ||
* Type C Plug | * Type C Plug | ||
Line 95: | Line 97: | ||
* Used to produce a sound at the beginning/end of distribution, for error alerts and playing ambient music. | * Used to produce a sound at the beginning/end of distribution, for error alerts and playing ambient music. | ||
- | * Connected to a digital pin. | + | * Connected to a digital pin via an npn transistor. |
**Switch** | **Switch** | ||
Line 223: | Line 225: | ||
Analog Button Input: button_read() | Analog Button Input: button_read() | ||
+ | |||
Reads analog value from A0. | Reads analog value from A0. | ||
Maps the value to: | Maps the value to: | ||
- | RIGHT, UP, DOWN, LEFT, SELECT, or NONE (debounced). | + | * RIGHT, UP, DOWN, LEFT, SELECT, or NONE (debounced). |
Adds a delay to avoid bounce/misreads. | Adds a delay to avoid bounce/misreads. |