Handling data received from the Arduino is done in the DataReceived event of the SerialPort control. This could look like this: void setup() ', NumericUpDown1.Value)
your “sketch”) is to set up the serial interface and implement your own protocol. The USB communication both on the computer and the Arduino microcontroller is done over a virtual serial port.
In this article I want to summarize how to do this and how to write your own interface application. This makes it possible to control an Arduino board over USB with a few lines of code. The Arduino is a great platform for a lot of projects in electronics since you do not have to start from scratch – not in hardware nor in software, since it comes with a nice framework including a bunch of useful libraries.