1

Is there a library to use I2C bus on RPi for Mono/.NET?

I was trying to find anything, but there are only libraries to work with GPIO but not with I2C.

  • I do not think the Pi version of Linux supports it yet. Only bit banged. Hang on there... or get an external I2C to USB/Serial – Piotr Kula Dec 7 '12 at 9:57
5

After long fruitless searching, I still didn't find anything on C#/Mono. So, I had to create my own library. In case someone else is looking for a similar solution, I put it on GitHub: https://github.com/mshmelev/RPi.I2C.Net

2

I don't know about .Net libraries but have you looked into overo-blinkm?

It was written for controlling an RGB LED. I am sure you can tweak it meet your requirements. It is written for the Gumstix board. I was able to cross compile it for the Raspberry Pi using the native makefile available in the library. I just had to change the I2C address to i2c-dev0

  • Thanks, it's a good place to start. But I wanted to have some out of the box solution :) – Max Shmelev Nov 24 '12 at 3:53
  • This instructable also offers some perspective with respect to I2C. I am afraid you would be the first one to write one :) – Sai Nov 24 '12 at 3:58
  • The Pi4J library includes support for I2C communication – Sai Nov 24 '12 at 13:59
  • yep, and I wrote one. – Max Shmelev Nov 27 '12 at 13:29
0

I use this one. I did a lot of testing, works well. MIT license. https://github.com/thomas3d/RPiCSIO

I have tested several other before, which had some problems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.