C Programming- wall follower

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)๐Ÿ˜‰. 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

Replies

  • satanas
    satanas
    C programming-wall follower robot

    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)๐Ÿ˜‰. 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

You are reading an archived discussion.

Related Posts

hi friends, when we open the site like friends18.com we find some html code for some images but any one khow how the html code was placed there is they...
how do converters work? how does our program come to know what data is there in the document? [like what is there in each cell of an excel file?]
10 Amazing things you can do with NOTEPAD๐Ÿ˜ Source: Internet
how much pressure(approx.) does the exhaust gas of a bike have?
India beats Pakistan 4-1 ๐Ÿ˜ Hockey World Cup taking place in Delhi, India World Class newly built stadium playing as host Australia lost today in its first match