New wall follower C programming
Dear all,
i have this situation: i need my robot to move a distance X cm along a straight wall of length Y m (the length is of no concern, thats what i think):wink:. it has 2 proximity sensors, 1 bump sensor and an encoder to know by how much it is moving. it will move along the wall for distance X cm, paint, and move distance X cm and so on until it hits the next wall (perpendicular to its initial direction of travel).
from a keypad i will enter a value between 1-4, each number representing the number of walls to be painted. so, from the bump sensor the robot will know when to shutdown. e.g. if i press 2, the robot will move along the first wall, paint it in the 'move-along-wall-sequence', and when it hits the next wall (Bump_count =1), it will steer to the next wall. do the process again until it hits the wall end (Bump_count =2). The robot will shutdown when painting is over.
case 1: if the robot moves by X cm and the two prox sensors detect wall, it will stop and paint. Encoder_count is reset. it moves along wall.
case 2: if the robot moves by X cm and the ONE of the two prox sensors does not detect wall, it will continue until both sensors detect wall and then stop to paint(Note that Encoder_count is greater than X cm now).
case 3: if the robot moves by a distance less than 3/4(X) cm and the two prox sensors detect wall. it will not paint.
case 4: if the robot moves by a distance greater than 3/4(X) cm but less than X cm and the two prox sensors detect wall. it will paint.
so guys how to i put this in C language???😕
even if you can provide a solution for only ONE wall, i would be grateful..
Please, have a look at it..
Regards,
Satanas
i have this situation: i need my robot to move a distance X cm along a straight wall of length Y m (the length is of no concern, thats what i think):wink:. it has 2 proximity sensors, 1 bump sensor and an encoder to know by how much it is moving. it will move along the wall for distance X cm, paint, and move distance X cm and so on until it hits the next wall (perpendicular to its initial direction of travel).
from a keypad i will enter a value between 1-4, each number representing the number of walls to be painted. so, from the bump sensor the robot will know when to shutdown. e.g. if i press 2, the robot will move along the first wall, paint it in the 'move-along-wall-sequence', and when it hits the next wall (Bump_count =1), it will steer to the next wall. do the process again until it hits the wall end (Bump_count =2). The robot will shutdown when painting is over.
case 1: if the robot moves by X cm and the two prox sensors detect wall, it will stop and paint. Encoder_count is reset. it moves along wall.
case 2: if the robot moves by X cm and the ONE of the two prox sensors does not detect wall, it will continue until both sensors detect wall and then stop to paint(Note that Encoder_count is greater than X cm now).
case 3: if the robot moves by a distance less than 3/4(X) cm and the two prox sensors detect wall. it will not paint.
case 4: if the robot moves by a distance greater than 3/4(X) cm but less than X cm and the two prox sensors detect wall. it will paint.
so guys how to i put this in C language???😕
even if you can provide a solution for only ONE wall, i would be grateful..
Please, have a look at it..
Regards,
Satanas
0