6.- A potentiometer in Arduino sends values to the App. Dynamic graph. Shift left.
p10A_OTG_potenciometro.aia (198.8 KB)
In this topic we saw how to send information via Bluetooth and display it in a dynamic graph:
Now we are going to carry out the same practice but sending the data by a module UART:
I will use CP2102 and an OTG cable.
The version of the SerialOTG extension used is: Data Built: 2021-02-03
- Arduino code:
// Juan A. Villalpando
// http://kio4.com/appinventor/10A_OTG_LCD.htm
#include <SoftwareSerial.h>
#include <Wire.h>
SoftwareSerial UART(10, 11) ; // UART(TX,RX)
int value_pot0;
void setup() {
Serial.begin(9600);
UART.begin(9600);
Wire.begin();
}
void loop() {
value_pot0 = analogRead(A0);
Serial.println(value_pot0);
UART.println(value_pot0);
delay(100); // Debe ser más lento que el Reloj.
}


