Communication between two Arduinos.
For this week, I just simply use the potentiometer to turn on/off the LED on the other board.
Sender’s Code:
int analogPin = A0;
int val = 0;void setup() {
Serial.begin(9600);
}void loop() {
val = analogRead(analogPin);
if (val > 600) Serial.println(1);
else Serial.println(2);
}
Receiver’s Code:
int byteRead;
int ledPin = 12;
char c = ‘ ‘;
