How to send Serial data from an Arduino Uno into the Serial of an ESP-01? So, i need to send sound sensor data from an Arduino Uno to the ESP8266 (ESP-01), so it can output a push notification to my phone whenever there's a loud noise. I have the sensor just powered and hooked up to the Analog 0 pin, and the ESP powered and hooked up to the Arduino Serial pins in reverse (RX to TX, TX to RX)
This is the code i have on the Arduino:
void setup() {
  Serial.begin(115200);
}

void loop() {
  Serial.write(analogRead(A0) + &quot;\r\n&quot;);
  delay(100);
}

And this is the code i have on the ESP:
(i'm omitting the notification part for clarity, it doesn't even use Serial, so i don't think it should interfere)
void setup() {
  Serial.begin(115200);
}
void loop() {
  String val;
  val = Serial.readString();
  if( val.toInt() &lt; 50 ){ sendNotification(&quot;Hello!&quot;); delay(10000);}
}

I have tested the Sensor output and it seems fine, whenever i snap or clap the readings show a peak (although reversed, it stays on 1023 constantly then peaks to around 0~50), and the ESP can also send notifications normally. But the trigger on the notification never seems to fire, so i guess the ESP is not receiving the data properly.
I'm new-ish to Arduino, so i don't know if i'm doing something wrong here,
Thanks in advance!
Writing Junk From Memory
Serial.write(analogRead(A0) + &quot;\r\n&quot;);

This is advancing a pointer to &quot;\r\n&quot; by whatever number is being returned by analogRead.  In other words, you are not sending the measurement but junk from memory after (or sometimes at) &quot;\r\n&quot;'s memory location.
Serial.println(analogRead(A0)); appears to be what you were going for here.  println's line termination for the UNO serial connection is &quot;\r\n&quot;.
Logic Levels
When it comes to attaching the serial connections together, there should be some level conversion going on.  Because an UNO's pins are 5V logic levels and the ESP-01 expects 3.3v levels.