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.



  • @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.



  • @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.



  • @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


 

Hello World?

Pylife on Kickstarter - November 2018








Back Us On Kickstarter >

Pycom on Twitter