Jump to content
I2Cdevlib Forums

Raspberry Pi


FJFranklin

Recommended Posts

Hi - I am working on a port of I2Cdevlib for the Raspberry Pi, see:

https://github.com/FJFranklin/i2cdevlib

 

It seems to be working, but I haven't tested extensively. I have a SensorStick which I have only just started playing with.

 

I have tried for minimal intrusion into the Arduino directory, and there I have kept the changes in the I2Cdev class itself.

Device issues:

  • The DS1307 and the SSD1308 both use Arduino PROGMEM stuff, which I'm not familiar with.
  • The IAQ2000 has its own sub-implementation of I2Cdevlib which I want to move into the main I2Cdevlib class.

The Makefile is a little clunky, but allows everything to be built in a parallel directory, e.g., "i2cdevlib/build" with:

 

make -f ../RaspberryPi/Makefile

 

In the RaspberryPi directory there is

  • a standalone class implementing the core I2C stuff (RPi2c),
  • a class called RPiHacks which defines miscellaneous functions needed to make i2cdevlib build on the Raspberry Pi,
  • a sub-directory called "kernel" which should be ignored, was added by accident and will probably be deleted in the near future, and
  • a sub-directory called "examples" which has the SensorStick code, which is very basic at the moment.

I am not an I2C expert so I'm still very uncertain about device support...

 

Regards, Frank

https://blogs.ncl.ac.uk/francisfranklin/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...