2

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.

1
  • 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
    Commented Dec 7, 2012 at 9:57

3 Answers 3

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

4
  • Thanks, it's a good place to start. But I wanted to have some out of the box solution :) Commented Nov 24, 2012 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
    Commented Nov 24, 2012 at 3:58
  • The Pi4J library includes support for I2C communication
    – Sai
    Commented Nov 24, 2012 at 13:59
  • yep, and I wrote one. Commented Nov 27, 2012 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 and acknowledge you have read our privacy policy.

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