Actually my colleague figured it out:
The Orbitty carrier board we are using with the Jetson TX2 has an expansion port with an I2C bus and four GPIO pins. Further reading here:
We are going to use a GPIO pin to control a LED. The GPIO pin connects to the gate on the BS170 MOSFET which drives our LED.
First we enable the four pins… You only need to do this once.
echo 388 > /sys/class/gpio/export
echo 298 > /sys/class/gpio/export
echo 480 > /sys/class/gpio/export
echo 486 > /sys/class/gpio/export
This will create four directories
In the above order those directories correspond to GPIO pins 0-3, which are pins 7-10 on the Orbitty expansion connector. We are using pin #8 on the connector to control the LED, so we’re interested in gpio298.
Once you have enabled the pins, you can set pin a pin’s direction like this
echo out > /sys/class/gpio/gpio298/direction
echo in > /sys/class/gpio/gpio298/direction
The first command will have the effect of turning the LED off by switching to output mode which defaults to low. You can turn the LED back on with the second command.
You can also turn the LED back on with this command
echo 1 > /sys/class/gpio/gpio298/value
And back off again with this one:
echo 0 > /sys/class/gpio/gpio298/value
Finally, you can read the state of the GPIO pin with the command: