kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Fix code example for #229
rodzic
9fddf89111
commit
520757d14b
|
|
@ -36,8 +36,8 @@ int main() {
|
|||
while(true) {
|
||||
current_buttons = get_button_states();
|
||||
changed_buttons = current_buttons ^ last_buttons;
|
||||
pressed_buttons = current_buttons & changed;
|
||||
released_buttons = last_buttons & changed;
|
||||
pressed_buttons = current_buttons & changed_buttons;
|
||||
released_buttons = last_buttons & changed_buttons;
|
||||
|
||||
// Toggle the LED states when a button is pressed
|
||||
led_states ^= pressed_buttons;
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue