Configuring GPIO
-
To configure GPIO, perform the following:
Execute the following command to configure GPIO44:
cd /sys/class/gpio echo 44 > export -
Locate to the GPIO44 directory:
cd gpio44Note: In this command,44represents the Sys number of the pin. For more information, see GPIO Pinout. -
Configure the direction of GPIO44 as in:
echo in > direction -
Alternatively, configure the direction of GPIO44 as out:
echo out > direction -
Configure the voltage level of GPIO44 as high:
echo 1 > valueTip: You can use an oscilloscope to check the voltage level. -
Configure the voltage level of GPIO44 as low:
echo 0 > valueTip: You can use an oscilloscope to check the voltage level. -
Connect the 3.3V Power pin with the GPIO44, and check the voltage level of
GPIO44:
cat value -
Connect the GND pin with the GPIO44, and check the voltage level of GPIO44:
cat value
