Hello, I have 2 question about udoo x86 II Gpio's pins. 1)How can i set the default value's (when start udoo all gpio's pins at HIGH state 1.8v) of gpio pins ? Can i change to low state. 2)I'm changing gpio's pins values but when i reboot the everything in sys/class/gpio folder is disappearing.How can i make them permanent. Thanks for answers.
1) I know from Raspberry Pi that this one has GPIO which are by default low and other pins are by default high. This depends on the electronics. It's hardwired. 2) State is lost during reboot or power-off. You could save the state before power off and set the state after booting, but you'll still have the problem with default state of the GPIO pins. You can use additional hardware to have during reboots persistent output signals. On solution could be a 8-Bit shift register (74hc595). Then you need 3 GPIOs to control 8 outputs. You can also buy modules which supports I2C (TCA9554A / 1.8V is supported).
2) For the Udoo Quad and Neo the Udoo team made a package in UdooBuntu that exported the GPIO during startup of the board. You could make one yourself for the Udoo X86. The source can be found here: https://github.com/ektor5/udoo-gpio-export
You can do that in the same script but only for output GPIO. After you have exported them as output you can set them high or low to your wishes. There will be a short amount of time during booting of the Udoo that the state is undefined.