4rel4in button mapping to GPIO

lightamanonfire

New member
Hello all,
I would like to get the onboard button on the 4rel4in to map to the GPIO pin37 as described in the user's manual. The manual simply says the onboard controller can be configured to map the button to that GPIO pin, but doesn't say how. Any idea how to accomplish this? Thanks!
 

alexburcea

Moderator
Staff member
Hi,

The functionality is implemented in firmware but the 4rel4in CLI does not have an option to enable it. We will release a new version and get back to you.

Alex.
 

alexburcea

Moderator
Staff member
The fix was more easy than expected. Please go to your 4rel4in-rpi folder update the repo "git pull" and reinstall the command "sudo make install"
Now the command options "cfgextird" and "cfgextiwr" extend the range for the channel parameter.
To enable the interrupt you need to run "4rel4in 0 cfgextiwr 5 1", the channel numbers from 1 to 4 represent the inputs, and the channel 5 represents the button. You get more info if you run "4rel4in -h cfgextiwr"
One more detail about the interrupt is that once enabled, at every button push it will tie the GPIO26 (pin 37) to zero for 15ms then release it back.
 
Top