Port name | Transmit pin | Receive pin |
Serial | 1 (also USB) | 0 (also USB) |
Serial1 | 18 | 19 |
Serial2 | 16 | 17 |
Serial3 | 14 | 15 |
Thread.sleep(4000);
after opening the port in the java code and now it works. The problem was that the arduino is reset everytime the port is opened. When i was sending the data, the arduino wasn't ready to listen.Thread.sleep(4000)
after opening the port in the java code and now it works. The problem was that the Arduino is reset everytime the port is opened, so I was sending the data when the Arduino wasn't ready to listen.