wiringPi equivalent library now available for the Jetson Nano

If you are working with the Jetson Nano GPIO in C or C++, and you want to use wiringPi, you can now use wiringJet.

wiringJet is a library with an equivalent interface to wiringPi. You can compile your code with wiringPi function calls for the Jetson Nano simply by changing the linker settings.

It is available on GitHub here: github.com/wiringGpio/wiringJet

This library is a cut and paste job with only some small modifications from the original sources. Acknowledgements to the folks who did most of the hard work:

  • The library copies the architecture and API of the wiringPi library by Gordon Henderson.
  • All the Nano specific GPIO handling is copied from GitHub at /Rubberazer/JETGPIO

The library is tested with a Jetson Nano on the NVIDIA developer carrier board, and the Seeed Studios A203 v2 carrier board.

If you need additional features to control your electronic creation, you may also use the wiringGpioExtensions library. This library wraps up wiringPi or wiringJet for easy cross platform code sharing, and provides additional device drivers for stepper motors, motors with rotary encoders, and seven segment displays. It is available on GitHub here: /wiringGpio/wiringGpioExtensions

The wiringGpioExtensions library has a C# wrapper so you can integrate efficient low latency GPIO control into your .NET applications.

I hope this can be useful to others in the community.

1 Like

hello graham.edward.briggs,

thanks for sharing, could you please provide more details of test environment.
for example,
which JetPack release it’s verified, are you testing with Nano developer kits, or Nano production modules?

JerryChang

The code is tested on the two different systems I have:

One is the official NVIDIA Dev Kit carrier board with the Nano that came with it. I did not double check the board hardware because it is now fastened inside a case with many screws, but I assume this would be a developer board.

The other is a Seeed Studio A203 v2 carrier board, with a Nano I purchased from Digikey. I am not sure what type this Nano is. I can not find a cross reference between the part number and the dev or production nano markings. You may see the picture attached and please let me know what I have.

I am running two different versions of Jetpack.

On the Developer kit carrier board:

$ apt-cache show nvidia-jetpack
Package: nvidia-jetpack
Version: 4.6.3-b17

On the A203 v2 carrier board (which has issues with > 4.6.1 jetpack)

$  apt-cache show nvidia-jetpack
Package: nvidia-jetpack
Version: 4.6-b199

On the developer board I have successfully tested:

  • pin on off in output mode
  • pin input mode
  • PWM on 31/32
  • I2C devices MCP23xxx pin expanders, PCA9685 PWM controller, ADS1115 ADC
  • SPI device MCP3008 ADC

On the A2203 board I have tested all of the above, except SPI, which does not work out of the box and I have not had time to figure this out yet.

Picture of the Nano used with A203 board attached.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.