I’m working on interfacing an HX711 with a Jetson Nano 2GB dev kit (the eventual application will interface with a Xavier NX, but just proof-of-concepting things here). This is my first time working with the Nano and for a start, I’m just trying to do the same thing I did on a Raspberry Pi (and an old RPi at that - I think it’s a model 2?).
I’m using a Python library ( GitHub - gandalf15/HX711: Read HX711 ADC for Weigh Scales on Rasperry PIs. ) which interfaces using the RPi.GPIO interface - which I was pleased to see is emulated by the Jetson GPIO interface. I was able to successfully toggle some of the pins on the Nano (including the pins which I’m using) with Python.
When I use the HX711 library, however, it’s unable to communicate with the HX711 device, because it’s not able to toggle the GPIO fast enough (an operation which works fine on the Pi). In specific, the clock pin can’t stay high for more than 60us (ie, 0.00006s) or else the HX711 shuts down - and according to the debug timing in the lib I’m using, it takes on the order of 2ms(!) to toggle the clock pin on this Jetson Nano 2GB dev kit.
Is this expected? If I rewrite the pin toggling in C and use the
sysfs interface for GPIO, can I expect better performance, or do I have to write a kernel driver for this?