Set pin mode at boot
-
Hi all, I wasn't able to save the changes on pin mode after reboot. I will explain myself better: what I'm trying to set is the i2c pin as GPIO but every time I reboot the Omega2s I've to change it again. How can I change this behavior? thanks
-
@ChMsT420 See this documentation article: http://docs.onion.io/omega2-docs/running-a-command-on-boot.html
-
@ChMsT420 @Lazar-Demin The only issue with using rc.local is that it runs last so if you have a daemon or loadable module that is dependent on the pin mode, rc.local might be too late.
Another alternative is to use a hotplug script that is triggered earlier in the boot process. Take a look in /etc/hotplug.d for some examples of these scripts, also hotplug is quite well documented.