I think you misunderstand me.or I mistyped what I want to do.
That will be a an interesting trick, connecting hardware to some bits in memory?
So, the hardware is to be connected to some bits in memory on one Arduino, and controlled by the other Arduino?
I think I've figured out,i have use a servo to test, i think the RCCC_v2_Video Switch is like a servo.
Video channel 1,is servo value 1000,Video channel 2 is 1500 and Video channel 3 is 2000.
When i press the PINK button on the PS2 control,servo goes to the left.
If i press it again,it goes to middle,press it again it goes to right,sow its working.
I will connect the RCCC_v2_Video Switch to Arduino mega tomorrow and see if working.
I have add this to Topside sketch:
int ButtonCount1 = 0;
int servo2;
if(ps2x.ButtonPressed(PSB_PINK))
{
switch(ButtonCount1)
{
case 0:
{
data.servo2 = 1;
ButtonCount1 = 1;
}
break;
case 1:
{
data.servo2 = 2;
ButtonCount1 = 2;
}
break;
case 2:
{
data.servo2 = 0;
ButtonCount1 = 0;
}
break;
}
}
I have add this to Bottomside sketch:
int servo2;
int servoPin2 = 9;
int servo2value = 1500;
int ServoNeutral = 90;
Servo Servo2;
Servo2.attach(servoPin2);
Servo2.writeMicroseconds(neutral);
// servo
if(data.servo2 == 1)
servo2value = 1000;
else if(data.servo2 == 2)
servo2value = 1500;
else
servo2value = 2000;
Servo2.write(servo2value);