Why the inventor does not work with the Arduino by connecting to the uart port ,,Note that there is a connection on the Serial USB Terminal application ???

//variable for Serial input
int input = 0;
//Pins for LED
const int LED = 13;

// the setup function runs once
void setup() {
  //Start the serial monitor at 9600 baud
  //Declare the LEDs to be outputs
  pinMode(LED, OUTPUT);
  digitalWrite(LED, LOW);

//runs over and over again
void loop() {
  //check if there's incoming data,
  if (Serial.available() > 0) {
    //if so, then read the incoming data.
    input = Serial.read();

    //if data, send the pin high
    if (input == '1') {
      digitalWrite(LED, HIGH);
      //send back data to phone
    else if (input == '0') {
      digitalWrite(LED, LOW);

Hello Ossaa, welcome to the forum.

Why are you ignoring the result of the OpenSerial call? Your code should only continue if OpenSerial = True.

I'm not sure about the required hardware - are you using Rolf Kardell's extension?

Serial component works with original Arduino UNO, but it doesn't work with many clones, for example those with CH340/CH341 chip.
It has also worked for me with the CP2102 module.

For other devices, use the extension that Chris has recommended, here are several examples:

1 Like