Hi everyone
I am new at programming and encountered a problem that I need experienced people like you to help to solve.
I have two arduino boards(M0 PRO and UNO). What I would like to do is transmit variables from M0 PRO to UNO which is connected to a screen(1.8" TFT shield, Adafruit), therefore those variables will be shown on the screen.
For testing, I simply tried to make "blank" shown on the screen while it did not work,below are what I wrote
M0 PRO
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.write("100");
delay(50); // delay in between reads for stability
}
UNO
float p = 3.1415926;
int pr = 0;
int oldpr = 0;
String prs = "empty";
}
void loop() {
prs = Serial.readStringUntil('\n');
String output = "Pressure kPa: " + prs ;
tft.fillRect(85, 5, 30, 10, ST7735_BLACK);
tft.setCursor(5, 5);
tft.setTextColor(ST7735_WHITE);
tft.setTextSize(1);
tft.println(output);
delay(2000);
}
It will be a great help
Thank you very much