Skip to main content
3 of 3
Code formatting and typo fixes.
timemage
  • 5.7k
  • 1
  • 15
  • 27

Well had a bit of luck after spending all day on this.

Arduino UNO (sender): Like mentioned by chrisl, use Serial.write and not Serial.print

mySerial.write(sonar.ping_cm());

UNO Wifi (receiver):

Serial.println(mySerial.readString());

So, instead of mySerial.read I used mySerial.readString. This is most likely a obvious mistake to almost everybody here; took me two days. Sigh.