Go Down

Topic: Display RX pin(digital pin) on lcd I2C  (Read 534 times) previous topic - next topic

sajad1911

Hi,
I have an esp8266 that is connected to an arduino Uno board.
I give AT commands to esp and recieve the responces.
I wanna display the AT responces that receives from RX pin(pin 0) of arduino  on a lcd crystal 16*2 I2C that is connected to A4 , A5 of Arduino(analog pines).
but with the below code I can display only the data that I write in serial monitor but I want to display only the RX pin(pin 0) of arduino on my  LCD I2C.

Please help me, I needs to help ...



/**

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

// Set the LCD address to 0x3F for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x3F, 16, 2);

void setup()
{
  lcd.begin();
  lcd.backlight();
 
  // Initialize the serial port at a speed of 9600 baud
  Serial.begin(9600);
}

void loop()
{
  // If characters arrived over the serial port...
  if (Serial.available()) {
    // Wait a bit for the entire message to arrive
    delay(100);
    // Clear the screen
    lcd.clear();

    // Write all characters received with the serial port to the LCD.
    while (Serial.available() > 0) {
      lcd.write(Serial.read());
    }
  }
}

Go Up