NVIDIA / jetson-gpio

A Python library that enables the use of Jetson's GPIOs
MIT License
928 stars 261 forks source link

Jetson.GPIO, RPi.GPIO and python-spidev #24

Closed 32nguyen closed 5 years ago

32nguyen commented 5 years ago

Hi,

I am trying to control a device (Unicorn HAT HD) using Jetson Nano through SPI. Unicorn HAT HD has been commonly used with Raspberry Pi. In this case, the required python package python-spidev is somehow interfaced with RPi.GPIO. I wonder if I use Jetson.GPIO, what should I do to replace RPi.GPIO to avoid conflict? Do I need to do that?

And where should I call GPIO.setmode()?

Hope my questions make sense.

Tom

swarren commented 5 years ago

Jetson.GPIO is intended to be a drop-in replacement for RPi.GPIO, and can even be imported as RPi.GPIO. So, you should be able to simply install Jetson.GPIO, not install RPi.GPIO, and then it sounds like python-spidev should just work.

32nguyen commented 5 years ago

Thank @swarren for your quick answer.