08-10-2016, 03:49 PM
(This post was last modified: 08-10-2016, 04:43 PM by MarkHaysHarris777.)
(08-10-2016, 03:25 PM)DonFL Wrote: The issue I describe is specifically using RPi.GPIO in Board mode. I too use the sparkfun T, and so typically go with BCM, but at the time I was doing ihis with what I was doing, board numbering was much easier.
I just tested again, few lines of python to simply set up some pins via RPi.GPIO, and anything assigning a valid GPIO mode with a (board) pin number greater than 26 tells me "channel sent is invalid". Switch to BCM mode, same physical pins, works fine.
Need to do a bit more digging into it and either find the error of my ways, or confirm as a bug.
hi DonFL, I can easily check this again too; I'll get right back to you...
(08-10-2016, 03:37 PM)Wolfenstein Wrote:(08-09-2016, 03:52 PM)MarkHaysHarris777 Wrote:Code:import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
p_switch = 19
GPIO.setup(p_switch, GPIO.IN, pull_up_down=GPIO.PUD_UP)
def push_button():
if GPIO.input(p_switch):
return False
else:
return True
That worked for GPIO19, 2 and 3 but not GPIO4. That is what I tested so far.
Confirmed: GPIO04 does not work as input, nor does it work as output. Time to dive into the code... to find out; and or the datasheet.pdf to see if the GPIO04 (BCM) board pin(7) has a special purpose on the PineA64... which to be compatible with the Raspberry PI it must not have ! GPIO04 is not a dual function pin.
Let's look at the code, and maybe we open an issue on github.
marcushh777
please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697
( I regret that I am not able to respond to personal messages; let's meet on irc! )

please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697
( I regret that I am not able to respond to personal messages; let's meet on irc! )