Servo control with ultrasonic sensors


hi please me this, need robot turn right when serial read there 2cm difference in readings of hc-sro4 sensors if perhaps tell me how can change below turn if difference between 2 sensors more 5cm or that.



code: [select]
if(cm > cm1) //if left receiving senors greater right receiving senor turn right
{
rightservo.write(50); //set right motor speed , direction
}


thanks in advance

code: [select]
abs (cm - cm)


Arduino Forum > Using Arduino > Project Guidance > Servo control with ultrasonic sensors


arduino

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support