We will create new Window Forms Application and add the following components from the picture
C# serial tool |
The refresh button will add com ports to the combo box. Let see how it is implemented
Now when we have the name of serial port, we need to create serial port object and connect it, then send/receive data.
Be careful, do not write data directly to the output text box in read_serial_port function, because you can't access a control created in another thread. To do that you need to invoke some updater function like this
Lets write the "echo" program in Arduino and see how our tool works.
Now we will upload above code to Arduino and run the tool. And it works. hurray:)
Working serial tool |
Good Job !
ReplyDelete