Polling inputs

alexburcea

Moderator
Staff member
Hi,

The last firmware version is 1.35.
Please make sure no one (python scripts, node-red, etc) accesses the I2C port during the update, even if it talks with different slaves on the bus.
 

Brecht

New member
Hi,

The last firmware version is 1.35.
Please make sure no one (python scripts, node-red, etc) accesses the I2C port during the update, even if it talks with different slaves on the bus.

And how can you check the version of the installed firmware?

But thanks to your guidance I was able to update the firmware and got the interrupts working on GPIO26! :)
Thanks a lot!
 

alexburcea

Moderator
Staff member
The "board" command option will tell you the firmware version.(ioplus 6 board).
I am glad you managed to do the update.

Alex.
 

Brecht

New member
Hi Alex,
So I got this working for the Home Automation HAT.
However, I have a the following HATs as well:
  1. 8-HV-INPUTS
The guide says the following:
"Transition of any input is causing pin 29 of the GPIO expander to go low. If you do not want to poll all
the inputs, you need to write an interrupt handler to detect the change."

But the pin 29 (GPIO 05) is low and stays low, it doesn't seem to react when the state of an input changes. Would I need to update the firmware?
  1. 16-INPUTS
You wrote "The current version of the 16 inputs does this by default because it is done with an io-expander which does that by default."
Does the 16-INPUTS interrupt make use of the GPIO 26, like the Home Automation HAT?
 

alexburcea

Moderator
Staff member
You must activate the internal pull-up for the GPIO5 for 8-inputs because the interrupt pin is an open collector.
Let me know the version number printed on your 16-inputs card.
 

Brecht

New member
The answer for the 16-inputs I've found in an earlier post of you... 😇

For the 8-inputs;
I did activate the internal pull-up for GPIO5, like I did for GPIO26 for the Home Automation HAT.
But it's state is 0 and remains 0. For GPIO26 it's 1 and it drops to 0 when an change is detected.
I added the config of the gpio node, seems correct to me.
setting gpio05.png
setting gpio05 b.png
 

Brecht

New member
The pin should go up when you read the inputs.

I'm sorry Alex, but I can't seem to get it working for the 8-inputs card

For the 16-input and Home Automation HAT, the interrupt is working
The GPIO is 1 and transitions to 0 when a change is detected.

But for the 8-inputs, nothing happens. GPIO05 (pin 29) is 0 and stays at 0, no matter what.
When I press the General Purpose Button on the card, I get an interrupt on GPIO26.
I see the LED's of the inputs changing, but no interrupt is detected...

You can check my debug flow here




gpio debug.png
 

alexburcea

Moderator
Staff member
Could you install a pull-up resistor between GPIO05 and 3,3V? Could you check if the pin is used by the raspberry OS for a different function?
 
Top