So far, everything has been going well.
We started using the buttons today, and I now have an issue.
One (and only 1) is not giving me the correct numbers returned from "ugame.buttons.get_pressed()"
From here (https://circuitpython-stage.readthedocs ... me.buttons) I should be and do for all but 1 device get:
Nothing = 0
B = 1
A = 2
Start = 4
Select = 8
Right = 16
Down = 32
Up = 64
Left = 128
From the one board I am getting:
Nothing = 0
B = 1
A = 6
Start = 6
Select = 8
Right = 48
Down = 48
Up = 192
Left = 192
Here is the code I am using:
Code: Select all
#!/usr/bin/env python3
# Created by: Mr. Coxall
# Created on: October 2019
# This file is the starting point for game using CircuitPython and uGame
import ugame
import stage
def main():
# repeat forever, game loop
while True:
# get user input
keys = ugame.buttons.get_pressed()
print(keys)
if __name__ == "__main__":
main()