.Net library to control an arduino

Hi :slight_smile: I've been working on a .Net library to control an arduino Mega (Will make a version compatible with other arduinos soon) through USB ! I originaly made it to control my CNC but I though some people here might be interrested :slight_smile:

The library is entirly written in C#. You just have to import the Dll into you .Net project, flash the program the the arduino and you're done ! I've included a demo software with the library so you can see how it works :slight_smile:

With this library, you have total control of the arduino though the software, it can do:
pinMode();
digitalRead();
digitalWrite();
analogRead();
analogWrite();
Serial1.open();
Serial2.open();
Serial3.open();
Serial1.end();
Serial2.end();
Serial3.end();
Serial1.print();
Serial1.read();
Serial1.write();
Serial2.print();
Serial2.read();
Serial2.write();
Serial3.print();
Serial3.read();
Serial3.write();
EEPROM.read();
EEPROM.write();

ToDo:
Add SPI support
Add i2c Support
Make version compatible with Uno/Duemilanove/Diecimila/Mini etc...

You can find it here:

Have a nice day :slight_smile:

Does it do the 'ln' variant also?

Serial.println("add CR and LF");

or would a separate
Serial.print ('\n', '\r'); // or whatever is needed for CR & LF

kind of thing be needed?

I didn't add a ln version because you can simply use arduino.Serial1_Print("This is like println !\n");

Just added println Support for convinience :slight_smile:

Just a screenshot of the test GUI ^^
Imgur

The value passed to analogWrite() is NOT a state, as your GUI implies.

Your GUI seems to imply that any pin can be used for analogWrite().

Yes, I know, it was a typo (I copy/pasted the GroupBox of digitaWrite()) It's corrected ^^