GPIO 44 value not changing for the first time execution I have checked with multimeter.
GPIO 44 value changes properly when I stop Execution and run it for second time.
Screen shot for executing code for first and second time:
There is no error first and second time displayed.
Since you use the /sys filesystem, you can play with it from the command prompt. What happens when you reboot and do the sequence
echo 44 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio44/direction
echo 1 > /sys/class/gpio/gpio44/value
Does it still not work for the first time?
That’s how I would debug this : find a reliable mode of operation by playing with shell scripts and then implent it in C.