GPIOs and Buttons
-
Hello,
in my current project I'm using the expansion board together with the Lopy (lora/wifi/ble). I use wifi, lora, the sd slot and ws2812 leds.
This works. However I came across a basic issue: I have several buttons that I connect to GND and an GPIO pin to recognize once a user pressed it. Unfortunately it looks like the GPIO pins P13 - P20 seem to not be usable for such an action. My lopy at least doesn't recognize the press. I can't really use other pins since SD, Lora and Wifi are taking pretty much the rest of the available pins - P12 is already in use - and works (as a button).Am I just doing something wrong or is this an actual bug?
Thanks for any help.
-
@binux
P13 to P18 don’t have internal pull-ups as shown in the pin map , I guess that’s the problem you’re facing? If so perhaps you can add an external pull-up resistor to you circuit.For P19 and P20 maybe you came across the bug fixed in the latest firmware released a few hours ago:
https://forum.pycom.io/topic/2421/new-firmware-release-v1-13-0-b1-sigfox-and-lora-coexistency-on-the-lopy4 -
@jmarcelino That's a good finding. I probably have this issue with P19/P20 since I am currently running version 10b. I will upgrade my firmware.
Regarding the pull-ups I didn't think they were necessary to detect a button press, but I guess otherwise the pins are floating too much. Thanks for your help.
-
@jmarcelino just as a note. P19 is not working for me as Input. P20 does. I'm now running the latest firmware. This seems to have not changed anything for me at least.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login