kai-morich / SimpleUsbTerminal

Android terminal app for devices with a serial / UART interface connected with a USB-to-serial-converter
MIT License
529 stars 195 forks source link

Can't Send a Message from Android to Esp32 #68

Closed oguzhangozdogan closed 9 months ago

oguzhangozdogan commented 10 months ago

Hi, i am using this app to send a message to an esp32. I can send it from esp32 to app and can see it on the terminal but can not do it vice versa. Didn't change anyting on the android side (except the baud rate which is 2400). Here is my esp32 code. Can't decide which side has the problem.

define RXD2 15

define TXD2 14

void setup() { Serial2.begin(2400, SERIAL_8N1, RXD2, TXD2); Serial.begin(2400); Serial.println("Started"); }

void loop() { while (Serial.available()) { char c = Serial.read(); Serial2.print(c);
}

while (Serial2.available()) { char c = Serial2.read(); Serial.println(c);
} delay(10); }

kai-morich commented 10 months ago

please check https://github.com/mik3y/usb-serial-for-android/wiki/FAQ#user-content-I_am_using_an_Arduino_Uno_Sparkfun_Pro_Micro_or_other_Arduino_but_codeSerialwritecode_does_not_send_data