Maze Following Robot code

edited January 11 in Arduino

So I a. Doing a project in my robotics class and my Arduino car robot has to get through the maze . So if the robot sensors sees white it will turn right if the robot sensors see black it will turn left and the ultrasonic on will detect the wall infront of it and stop but I just don't have any codeing experience


  • edited January 12

    Look at the arduino and processing examples for reading an arduino sensor.

    Find out on which Pins your sensors are

  • I just don't have any codeing experience

    Explore the examples to start. Become familiar with them and learn how they work. Keep the reference at hand: as it will answer most of your initial questions related to Processing.

    Then you can explore previous post working with arduino:

    Find one that is simple for you to follow and test (I emphasize: test). If you cannot run it, tell us what you did, post your code and describe the problem you see.


  • edited January 13

    All problems like this can be split into sub tasks. You appear to have two sensors so

    1) concentrate on writing code to read the data from the sensors and work out the range of values produced i.e.
    a) what value do you get when nthe sensor sees white/black?
    b) what range of values do I get from different distances?

    Once you know these you should
    2) create simple code to move/turn the robot

    3) create code that takes the inputs and sends appropriate outputs to control the robot.

    Doing it this way is much easier because you can focus your efforts on solving smaller tasks rather than some giant one/

Sign In or Register to comment.