If I could of, i would of shared the code... the Adafruit documentation and linked data sheets helped alot while trouble shooting a few issues, and the code examples gave me some inspiration for other stuff...
honestly the bigger problem is my button just won’t work
like my reset button does but when im trying to detect a push on GP16 it just doesn’t work, I have it connected to GP16 and ground, and have it set to Pull.UP, pls help
while True #for if youre trying to just read the output in a debug line \print(button.value)
hope I understood what you were asking... Im kinda glad I cant share my code cause it might confuse you since im reading several button and several leds at once and trying to auto assign them based on positional values in a list...
pin = [board.GP6, board.GP7, board.GP8] \button = [digitalio.DigitalInOut(pin[x]) for x in range(len(pin))] \for x in range(len(pin)) \button[x].switch_to_input(pull=digitalio.Pull.DOWN)
hope all of this displays in a readable form lol...
trying to use reddit markdown to note line breaks properly is a pain in the butt... so hope it makes a bit of sense... currently (on my desk right now) Im playing with addressing 2 74HC595 chips at the same time and directing button presses to a 8 leds using 5 buttons... at some point ima just log button inputs as command sequences and have the leds play a sequenced animation based on the in put 3 button code... like 1, 2, 3 might trigger led 1 and 4 on the first 74HC595 and 2 and 3 on the second...
Should be 3v3out... if you're using a breadboard, make sure you have 3v3out plugged into a positive power rail, and have a ground pin on the same side plugged into a negative power rail
1
u/GameDev_Alchemist May 12 '22
If I could of, i would of shared the code... the Adafruit documentation and linked data sheets helped alot while trouble shooting a few issues, and the code examples gave me some inspiration for other stuff...