Basic input/output gpio pin GL-INET
echo "21" >/sys/class/gpio/export
2. Define gpio port 21 (example as output)
echo "out" >/sys/class/gpio//gpio21/direction
if as input type,
echo "in" >/sys/class/gpio//gpio21/direction
3. Fire up the led on gpio port 21
echo "1" >/sys/class/gpio/gpio21/value
No comments:
Post a Comment