Open michaelcheng1991 opened 9 years ago
This C# class combined with the Arduino sketch allows you to plug an Arduino into a PC's USB port and then have its com port detected by the C# application. Once the com port is known the C# application can then send/receive messages from the Arduino.
The concept is quite simple. The C# application polls all the com ports and sends a query using a simple protocol (explained below). Once the Arduino receives the request it replies. The C# application that notes the com port that caused the Arduino to reply and saves the name of the com port. The C# application can then use this com port in subsequent communications.
Best tutorial website including I2C http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/
INFO on SPI communication https://learn.sparkfun.com/tutorials/serial-peripheral-interface-spi
Take a look http://edge.rit.edu/content/P11015/public/Code%20Library