Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

Using ADC Pi Plus with Mono

2623 Views - Created 22/07/2016


Posted by:

nfhofmann Avatar

Hi, i am using the ADC PI Plus to read samples from an external joystick.The code in C works very well. But my program is completely in c#.My question:how can i use the function <read_voltage(....)> from ABE_ADCPi.h in mono ?many thanks in advanceNorbert


Posted by:

andrew Avatar

United Kingdom

andrew Twitter  andrew Website  


I don't have any experience with using mono on the Raspberry Pi so I am afraid I do not know how you would integrate a c library into a c# application.

We do have a Windows 10 IOT version of the ADC Pi library that is written in C# which you may be able to modify to run under mono. You will need to make a few modifications as the library is designed to use the Windows 10 I2C classes, these will need to be replaced with a mono I2C library. After a bit of searching around google, I found a Raspberry Pi IO library that supports I2C so it should be possible to modify the ADC Pi library to use that instead for accessing the I2C bus.

The ADC Pi library uses a separate ABE_Helpers.cs class for accessing the I2C bus. If you can modify the four I2C read and write methods at the bottom of the class to use the mono I2C library instead then you should not need to do any other modifications on the ADC Pi library.

Sign in to post your reply

Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.