chill wrote:
> I'll also compare with what I get on a 3B+.
More GPIO testing.
Without anything connected to the GPIO pins on my 4B I'm still finding
that I'm unable to change the value on a given pin, but on a 3B+ it's
behaving as expected. The version number is 2.46 on the 3B+ and 2.52 on
the 4B.
Specifically:
Code:
--------------------
gpio mode 24 in
gpio mode 24 up
--------------------
... should pull the pin high, to give a value of '1', but since this is
the default state there's no apparent change.
If I follow that with:
Code:
--------------------
gpio mode 24 down
--------------------
... this should pull the pin to GND, and give a value of '0'. On the
3B+ this works, but it doesn't on the 4B. Calling 'gpio mode 24 up'
again on the 3B+ toggles the state back to '1'.
On the 3B+ I can use:
Code:
--------------------
gpio mode 24 out
gpio write 24 1 (or 0)
--------------------
... to set the pin state accordingly, but on the 4B the state doesn't
change.
Once I realised that the pin numbers used by gpio aren't the same as
those used by sbpd, and that I need to use the '-g' parameter to make
gpio interpret them as BCM, I have been able to change the pin state on
the 3B+ with my push button pcb, but not on the 4B. I issue:
Code:
--------------------
gpio -g mode 24 in
gpio -g mode 24 up
--------------------
... to match the configuration used with sbpd (b,24,PAUS,2,0), i.e.
2=pull-up, 0=the pressed state. This sets the value to '1' (thanks to
the pull-up resistor). My button connects GPIO24 to GND, so when I
press it the value changes to '0' on the 3B+, but not on the 4B.
So at this stage it seems to me that either the latest version of
wiringpi, 2.52, intended to be compatible with the 4B, isn't working as
expected, or, more likely, I've forgotten to install something on the 4B
to make it work properly.
------------------------------------------------------------------------
chill's Profile: http://forums.slimdevices.com/member.php?userid=10839
View this thread: http://forums.slimdevices.com/showthread.php?t=110727
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix