Go Down

Topic: .Net library to control an arduino (Read 372 times) previous topic - next topic

alexandrerouma

Hi  :) 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 :)

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 :)

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:
https://github.com/AlexandreRouma/MegaInterface

Have a nice day  :)
May the memez be with you !

YouTube: https://www.youtube.com/channel/UCyJnODwZcdHkUC8Y7pccc6A
Twitter: https://twitter.com/WhatsTheGeekYT

CrossRoads

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?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

alexandrerouma

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

YouTube: https://www.youtube.com/channel/UCyJnODwZcdHkUC8Y7pccc6A
Twitter: https://twitter.com/WhatsTheGeekYT

alexandrerouma

Just added println Support for convinience :)
May the memez be with you !

YouTube: https://www.youtube.com/channel/UCyJnODwZcdHkUC8Y7pccc6A
Twitter: https://twitter.com/WhatsTheGeekYT

alexandrerouma

Just a screenshot of the test GUI ^^
http://imgur.com/wYacpWr
May the memez be with you !

YouTube: https://www.youtube.com/channel/UCyJnODwZcdHkUC8Y7pccc6A
Twitter: https://twitter.com/WhatsTheGeekYT

PaulS

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().
The art of getting good answers lies in asking good questions.

alexandrerouma

#6
May 18, 2017, 05:02 pm Last Edit: May 18, 2017, 05:11 pm by alexandrerouma
Yes, I know, it was a typo (I copy/pasted the GroupBox of digitaWrite()) It's corrected ^^
May the memez be with you !

YouTube: https://www.youtube.com/channel/UCyJnODwZcdHkUC8Y7pccc6A
Twitter: https://twitter.com/WhatsTheGeekYT

Go Up