Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPIO26 isn't sensed correctly on RPI4 #90

Open
davthomaspilot opened this issue Jan 8, 2025 · 3 comments
Open

GPIO26 isn't sensed correctly on RPI4 #90

davthomaspilot opened this issue Jan 8, 2025 · 3 comments

Comments

@davthomaspilot
Copy link

I use pin 37, GPIO 26 as a flow switch input. It worked fine on RPI 3B+, Bullseye:

image

But, the Pin State is not sensed correctly nor is recognized in njsPC.

I can use pigpio tro check the state of GPIO26--when flow is on, GPIO26 is high, when flow is off, GPIO26 is low.

If I click the Inverted check box, njsPC thinks there is flow, but it doesn't change when flow goes off. It's like the GPIO that's being monitored by njsPC is incorrect.

Here's the RPI 4 pin-out--but it's the same as it was in earlier pi versions:

image

@davthomaspilot
Copy link
Author

Looks line line 690 in relayEquipmentManager/pinouts is incorrect.

Most gpioID differ from the BCM number by 512--I'm guessing that's because of different offset for GPIO memory mapping RPI4 versus previous versions.

gpioD was 528-I think it should be 538 (26+512). I made that change and it fixed the issue for me.

image

There other instances where the difference is not 512, but I'm too ignorant to know if maybe that's actually correct for some GPIO.

@davthomaspilot
Copy link
Author

here other instances where the difference is not 512, but I'm too ignorant to know if maybe that's actually correct for some GPIO.

Eg, line 684:
image

Like someone was going through and adding 512 to the BCM # but missed BCM 16? Or, maybe my ignorance...

@tagyoureit
Copy link
Collaborator

I've been looking into this. I need to dig deeper. I'm not seeing why the gpio's are numbered the way they are. And it isn't clear to me if they will change between different hardware (I think it might) or not. @rstrouse if you have time, can you shed some light here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants