Hi everyone, I want to create a IO signal that will be HIGH for 1 ms and LOW for 99 ms but when I tried GPIO pins in Xavier NX it doesn’t work well. Signal width for 1 ms and frequency is not accurate, error is more than I expect due to real time system. I use this code:
#!/bin/bash
echo 402 > /sys/class/gpio/export
echo “out” > /sys/class/gpio/gpio402/direction
trig_sig_1=/sys/class/gpio/gpio402/value;
clear
while :
do
echo “On”
echo 0 > $trig_sig_1
sleep 0.001
echo "Off"
echo 1 > $trig_sig_1
sleep 0.099
done