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.
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.
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?
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: