We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23e61b9 commit e13b850Copy full SHA for e13b850
1 file changed
assignments/03-game-controller-discover/code_solution.md
@@ -15,13 +15,14 @@ while True:
15
if current_state is state_wait:
16
keyboard.press(key) # Send our defined key as a command...
17
print("button is pressed") #Print a confirmation in the serial monitor
18
- keyboard.release_all() # and release all keys again
19
20
current_state = state_button_is_pressed # Update our state
21
22
elif button.value is False:
23
if current_state is state_button_is_pressed:
+ keyboard.release_all() # and release all keys again
24
print("button is released") # Print a confirmation in the serial monitor
25
+
26
current_state = state_wait # Reset the state
27
28
# Sleep briefly so keypress events occur at a human timescale.
0 commit comments