You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get output to work, I can toggle an LED, but I can't read a switch on port 4, which I can read from python just fine.
Here's the code I used, I see no change when I push the switch. Using a voltmeter it seems that
GPIO.setup(4, GPIO.IN, pull_up_down=GPIO.PUD_UP)
works in python, but
pinMode(4, INPUT_PULLUP)
does not work in the arduino layer.
Further testing shows that digitalRead does work after that, but I have to add a pull up resistor on my button to make up for the missing one in software (when using the arduino layer)
The text was updated successfully, but these errors were encountered:
marcmerlin
changed the title
pinMode INPUT does not seem to work
pinMode INPUT_PULLUP does not seem to work
Apr 19, 2019
Page 90 of the PDF says that GPIO defines start at address 0x7E200000 but I can't find that address anywhere in the code:
polgara:/tmp/RasPiArduino$ grep -ri 7E20 .
polgara:/tmp/RasPiArduino$
I get output to work, I can toggle an LED, but I can't read a switch on port 4, which I can read from python just fine.
Here's the code I used, I see no change when I push the switch. Using a voltmeter it seems that
works in python, but
does not work in the arduino layer.
Further testing shows that digitalRead does work after that, but I have to add a pull up resistor on my button to make up for the missing one in software (when using the arduino layer)
The text was updated successfully, but these errors were encountered: