Power & Source of Big Ideas

Python support for IC2, SPI, etc.

Moderators: chensy, FATechsupport

Forum,

I want to use python calls for peripherals like i2c and SPI. Is there a standard and easy way to do with with my NEO AIR, or python library to do this?

Normally on my RPi and my BeagleBoneBlack I use a platform agnostic python library https://github.com/adafruit/Adafruit_Python_GPIO. This is a wrapper around different hardware to use a single IO scheme. Its nice because I can develop code on whichever hardware I have around me. Then you use an adapter class to control the hardware specifics. There are scripts for SPI, I2C, PWM, etc. What I need help with is how to assign pins. My hope would be that I could use the RPI.GPIO_NP lib to interface and be set. But I'm afraid it is going to be more work. Any thoughts?

Thanks,
Darren
Hello, Dareis.

For I2C in Python try SMBUS2:
https://pypi.org/project/smbus2/

Who is online

In total there are 48 users online :: 0 registered, 0 hidden and 48 guests (based on users active over the past 5 minutes)
Most users ever online was 2865 on Sun Nov 10, 2019 5:27 am

Users browsing this forum: No registered users and 48 guests