Skip to content

RP2040 (Pi Pico) limit switch input not reading, always shows high #523

Discussion options

You must be logged in to vote

if you modify that line from the direct GPIO register read

#define mcu_get_input(X) CHECKFLAG(sio_hw->gpio_in, indirect(X, BIT))

to the arduino input read function

#define mcu_get_input(X) digitalRead(indirect(X, BIT)) which gets resolved to !!((1ul << gpio) & sio_hw->gpio_in) that is not different >from what I'm doing originally, the input reading starts to work...but only partially.

LAST FAMOUS WORDS!!

OMG!! Sometime I do some really dumb mistakes.
Found the issue. It's also being patched.

#525 - fixes the status report displaying incorrect pin values
#527 - fixes the incorrect pin input and output value reading

Both will be patched in the master branch in a few minutes.
Thanks for re…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@Hyakutake12
Comment options

@Paciente8159
Comment options

@Paciente8159
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Hyakutake12
Comment options

Answer selected by Paciente8159
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants