Hello friends,
I am going to comment on my experience with the great extension of the user @rkl099, which you can find in this topic:
-
With this extension we can connect a mobile phone (or tablet) to the Arduino with a CH340 chip by cable.
-
It has been tested with CdcAcm, PL2303, PL2303HX, FTDI, CP210x, CH341, CH341 (“fake”) and CH340.
-
Get com.SerialOTG.aix:
To carry out these examples I will use a mobile with Android 9, OTG cable, USB cable and an Arduino UNO with CH340.
IMPORTANT!!!: In the mobile Settings. Additional Settings. We must activate OTG.
- Settings / Additional settings / OTG / Enable OTG.
Here this guide in Spanish:
http://kio4.com/appinventor/10A_OTG_LCD.htm
0.- App sends the characters "a" and "b" to the Arduino to turn LED13 on/off.
p10A_OTG_print_LED.aia (186.0 KB)
char caracter;
void setup() {
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop() {
if(Serial.available()) {
caracter = Serial.read();
if(caracter == 'a'){ digitalWrite(13, HIGH);}
if(caracter == 'b'){ digitalWrite(13, LOW);}
}
}