Arduino connection for C# is a C# and ino library that work together to facilitate the data transmission between an Arduino board and PC program.
If you don't want to download all project and just want the dll you can obtain it from here or from NuGet.
The code is separated in two folders:
- ArduinoConnectionC# contains the full C# code as well as the C# code for the examples. Just load the solution in Visual Studio and check the projects.
- ArduinoConnectionIno contains the library for arduino.
- ArduinoExamples contains the Arduino code for both examples loaded in the solution.
There are two files, constants.cs
for configuration and the main class ArduinoConnection.cs
. Be sure that configuration values are the same you set in the Arduino code.
There are just one file that contains all the logic for arduino. At the begining of the file you can find the Baud rate for the serial connection. Make sure that it's the same you have in the configuration file for C#. Also set the handshake value to your favorite.
You can find two examples in the Solution Explorer and the ino code in the ArduinoExamples folder.