Hi everybody. I'm using windows forms with visual studio and I added an extra serial port in my arduino uno with <SoftwareSerial.h>
I added a SerialPort in my windows forms app. But how can I send (from windows forms) and receive(from windows forms too) data from the extra serial port created in arduino IDE?
Just like you would using a hardware serial port… (it will be more fragile, keep the baud rate low and/or the amount of data being exchanged)
The default serial port is recognized as a virtual COM port because that port goes through the ATMEGA16U or CH340 chip. You will need a RS232 to USB adapter, either a cable or a breakout board so that port appears in Windows.
But I'm already using the arduino serial port. How can I decide towhich of the two send the data from windows forms?
You will need to add indeed an FTDI or equivalent usb to serial adapter and in you forms code
static SerialPort arduinoSowftwareSerialPort;
static public void Main()
arduinoSowftwareSerialPort = new SerialPort("COM3", 9600, Parity.None, 8, StopBits.One);
If the adapter is on COM3
I have not touched a PC since ages so…
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.