I have two Arduinos, on one I have a potentiometer and the other a servo. I would like to have the value of the potentiometer go through a wire into the other Arduino, kind of like Virtual Wire except it would use a real wire.
Here is the code for the potentiometer
int stern = A0;
int sternValue = 0;
void setup()
{
pinMode(stern, INPUT);
}
void loop()
{
sternValue = analogRead(stern); //Then send it through the wire
}
Here is the code for the Servo
#include <Servo.h>
Servo servo;
int servoValue;
void setup()
{
servo.attach(9);
}
void loop()
{
//servoValue = The value from the potentiometer
servo.write(servoValue);
}
Thanks for you time and help