Hughes
Hughes

Reputation: 121

Use I2C Device by C#

I want to control the I2C device through C# on Windows 10. According to the I2cDevice class from MS, it seems that the class MUST be used by UWP?

If the class can be used only by UWP, I want to know how to control the I2C Device by general C#?

Hope someone can provide some suggestions. Thank you!

Upvotes: 3

Views: 5297

Answers (2)

MadeInTheUSB
MadeInTheUSB

Reputation: 120

You can use the I2C protocol from Windows 7, 8 or 10 and any .NET languages, with the library MadeInTheUSB.Nusbio.Lib.dll.

Here is a smaple to control an I2C LCD in C#.

Here are samples to control some Adafruit I2C devices.

Upvotes: 1

Hughes
Hughes

Reputation: 121

About the I2cDevice class, I had asked the MS engineer a few days ago in a seminar.

He told me there are two limitation to use the library:

  1. The OS MUST be the IoT core rather than the general Win10.
  2. It MUST be programmed by the UWP.

If the OS is not the IoT core, it needs the driver from Intel to control the I2C device.

Hope this information is useful for someone:)

Upvotes: 3

Related Questions