Jetson/Tutorials/GPIO using arduino
Quickly testing a GPIO pin
To set pin GPIO_PH1 as an output:
sudo su (Enter your user password. Defaults to "ubuntu") # See which pins are currently configured as GPIO, and what their state is. cat /sys/kernel/debug/gpio # Validate that the entry for the Tegra GPIO controller has a base value of 0. If not, add on whatever the base value is to the “57” in the commands below.
echo 57 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio57/direction echo 1 > /sys/class/gpio/gpio57/value
Put a voltmeter on pin 50 (gpio57) of the 2-row header (J3A1) & pin 2 (GND) also of the 2-row header,
You should now see that it is at +1.8V. This pin is LCD_BL_PWM (GPIO_PH1). Setting it to 0:
echo 0 > /sys/class/gpio/gpio57/value
You should now see that it is at 0.0V (roughly).
Once you’re done:
echo 57 > /sys/class/gpio/unexport exit
You can now set a 1.8V voltage on a GPIO pin, but the GPIO pins on Jetson TK1 don’t have enough electrical current or power to connect directly to an LED and also, 1.8V is a lower voltage than you normally want. So the easiest way to control a single LED from Jetson TK1 is to build a transistor switch circuit, as shown in the circuit diagram (which you can download for the free KiCad package here):
Connect the red wire (+5V) to pin 1 on J3A1 of Jetson TK1 (bottom-right pin of the dual-row header, next to the text saying “DISPLAY TOUCH”) to power the LED from Jetson TK1.
For more detail: Jetson/Tutorials/GPIO
We recommend EasyEDA for electronic circuit design.
From Schematic Drawing to PCB Production, Just Need One Tool
Cheap PCB Prototype: 10 pcs 2 layers only $10, quick delivery, 100% E-test
This Post / Project can also be found using search terms:
- Jetson TK1 GPIO
- TK1 GPIO