Two NANO properly communicate over 485
Nunchuck data generated on MASTER and feeding PWM left right up down to bescor locally.
on SLAVE LED attached to pin 11 receive PWM values from MASTER
actually i changed the MASTER code to see if i can send Nunchuck values instead of potentiometre values:
On my Master where is my first obstacle is to get some real value to level
//byte level = analogRead (0) / 4; //original script
byte level = mapx; //to test data and it works.... it sent PWM Nunchuck value to Slave
But those values are not good... it is just for testing!
The way i see it.... i need:
On MASTER
Send left right up down data to Slave
On SLAVE
Get left right up down data from MASTER and apply to pins 11, 3, 10 and 9
Could be pwm or LOW!... seems that when up get PWM down is LOW to avoid jamming...
if (vary > 18)
{
analogWrite(up, mapy);
digitalWrite(down, LOW);
}
Thanks