No (serial) communication between Arduino Uno and ESP8266

Hi all,
First post on this forum, don’t be too hard)

Having a problem where I send data (int hour) from my Wemos D1 mini esp,via Serial to my Arduino Uno,
no data gets read… :confused: To clear things up, they are connected by Uno pin1 RX-> ESP pin1 TX and
Uno pin2 TX-> Esp pin2 RX, both set to 9600 baud rate. Both a share a common ground,
and both receive their appropriate power. I have used multiple example snippets from the internet but have not come to a working solution now. I read some people still haven’t figured it out for this combination.
Both ino’s also attached. The reason for 2 boards is a lack of GPIO pins, but won’t use a MCP23016/14 or FCP8574. (for those who noticed, only my 4x4 keypad and Ledstrip work without their library as this is mandatory by my guidelines).
Any help with this would be greatly appreciated :slight_smile:


#include <ESP8266WebServer.h>
#include <ArduinoJson.h>
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <WiFiClientSecure.h>
#include <SoftwareSerial.h>
#include <DS3231.h>
#include <Wire.h>
#include <NTPClient.h>
SoftwareSerial ESPserial(9,10); //RX & TX
//absent rtc
DS3231 rtc;
//Btc Api
const char* host = "";    
int noDec = 0;
const char* ssid     = "NoWifi4U_2.4Ghz";
const char* password = "ValentinB00";
const long utcOffsetInSeconds = 0;
NTPClient timeClient(ntpUDP, "", utcOffsetInSeconds);
WiFiClientSecure client;
ESP8266WebServer server(80);
void handle_root() {
  server.send(200, "text/plain", "Hello from the esp32");
int btc;
void setup() {
  WiFi.begin(ssid, password);
  while ( WiFi.status() != WL_CONNECTED ) {
    delay ( 500 );
    Serial.print ( "." );
  Serial.println("IP address: ");
  server.on("/", handle_root);
  Serial.println("HTTP server started");
void loop() {
  bool h12, pm;
  int hour = timeClient.getHours() + 1; // Get the hour
  int minute = timeClient.getMinutes(); // Get the minute
  String newhour;
  String newminute;
  if (hour < 9)
     newhour = '0'+ String(hour);
  if (minute < 9)
     newminute =  '0'+ String(minute);
  //Serial.print("connecting to ");
  WiFiClient client;
  const int httpPort = 80;
  if (!client.connect(host, httpPort)) {
    Serial.println("connection failed");
  String url = "/v1/bpi/currentprice/USD.json";
  //Serial.print("requesting URL: ");
  client.print(String("GET ") + url + " HTTP/1.1\r\n" +
               "Host: " + host + "\r\n" +
               "Connection: close\r\n\r\n");

  //Serial.println("request sent");
  String answer;
  while (client.connected()) {
    String line = client.readStringUntil('\r');
    answer += line;
  String jsonAnswer;
  int jsonIndex;
  for (int i = 0; i < answer.length(); i++) {
    if (answer[i] == '{') {
      jsonIndex = i;
  jsonAnswer = answer.substring(jsonIndex);
  //Serial.println("JSON answer: ");
  int rateIndex = jsonAnswer.indexOf("rate_float");
  String priceString = jsonAnswer.substring(rateIndex + 12, rateIndex + 18);
  float price = priceString.toFloat();
  char sendBTC[10];
  dtostrf(price, 4, 0, sendBTC);
  sprintf(sendBTC, "%d", (int)price);

My first suggestion is to work in just the serial communication between the ESP and Uno. Get that working by itself before adding in the other complexity.

To clear things up, they are connected by Uno pin1 RX-> ESP pin1 TX and
Uno pin2 TX-> Esp pin2 RX,

SoftwareSerial ESPserial(9,10); //RX & TX

There seems to be a conflict there. Which pins are connected?

Indeed trying to work this out from a fresh sketch. The Esp pin 1 RX corresponds to GPIO9 and Esp pin 2 TX corresponds to GPIO10 looking at this Wemos pinout.

I have made a hardware change to check if the i2c protocol works, loaded the default i2c scanner example onto the ESP and connected ESP SDA (D2 or Gpio4) to UNO SDA (Gpio18) and ESP SCL (D1 or Gpio5) to UNO SCL (Gpio19). Unfortunately, the program does not return any connected i2c devices.. I'm having a thought my esp is damaged but my main code which gets time, and data from an Api works.

I know I should write code myself, but it really is my hardest skill to overcome. Any info that leads to a solution or more problems will be cherished greatly :slight_smile:

(p.s. I could add my schematic if needed)