Jump to content

Recommended Posts

Posted

Hi everybody,
I need your help in setting the default values of some or all GPIO Pin, so that it will be always activated after reboot instead of deactivated like the default is today.

The reason for this is that I've connected a relaisboard to some GPIO Pins that will need "1" to be deactivated . Everything works fine, I can control and work with these Pins like needed by using "1" for OFF and "0" for ON.


After booting up my BPI I initialize the needed GPIO Pins via export the pins. That will create virtual directories for these Pins with these defaults:

    direction -> in

    value -> 0

Like I mentioned, my relaiseboard need a logical 0 to be activated, so when I switch the direction to out, my motor on the related relay start to spin.

 

Doing a sequence of create via export, set direction to out and set value to 1 will we fast, but will activate the motor for a short time, this is what I must avoid!

 

Instead of rebuilding the HW for using the value "1" to been activated instead of "0" I try to change the GPIO default value from 0 to 1 what means deactivated/not active for my relaisboard.

 

Since this is a BPI M2 Zero and there are no newer images I think I need to do this via the script.bin file. 

I've found for my pin PA08 these entries, but have no idea what default means what:

    smc_sda = port:PA08<2><default><default><default>
   scr_sda = port:PA08<2><default><default><default>

Please can someone help me doing this or point me to an example how this must be done ?

Regards
WolliK

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines