Hey,
I got a problem with the Serialcommunication between mbed and the nodemcu.
The wiring is: Nodemcu rx to mbed tx.
#include "mbed.h"
Serial nodemcu(p28, NC);
int main()
{
nodemcu.baud(115200);
while(1) {
t2.start();
if(t2.read_ms() > 1000)
{
nodemcu.printf("Hello");
t2.reset();
}
}
}
My problem is if there is no delay about 1second after nodemcu.printf I dont recieve anything on the Nodemcu.
NodeMcu:
void setup() {
Serial.begin(115200);
Serial.println("Starting...");
}
void loop() {
while (Serial.available()) {
String node = "";
node = Serial.readString();// read the incoming data as string
Serial.println(node);
}
}