Welcome! Log In Create A New Profile

Advanced

Arduino Robot?

Posted by sarf2k4 
Arduino Robot?
November 26, 2015 12:57AM
Hi, I recently had a problem with my Arduino Robot here [www.arduino.cc] for the robotics competition last week. I'm unable to make the robot to switch between 2 modes. The main problems was that the Robot didn't really follow the lines whenever I put in the maze/wall navigation codes. Here is my code [github.com]

All the issues were there and this Arduino Robot were given to us to be used during the competition

If anyone owns the same thing hopefully can test my code out and help me troubleshoot. Although the competition has already ended but I really do want to know what produces this problem.

For this, you will need 3 ultrasonic sensors; front, left, right
Re: Arduino Robot?
December 07, 2015 04:32AM
I'm not actually a software guy but I had some projects thru the years when I was building Line tracers and mini-sumo robots.
I actually saw a syntax error (actually the code looks good to me).

void modech(){
  if (Robot.keyoardRead() == BUTTON_UP)
    State = 0;
  if (Robot.keyoardRead() == BUTTON_DOWN)
    State = 1;
  Serial.println (State);
}

should be:
void modech(){
  if (Robot.keyboardRead() == BUTTON_UP)
    State = 0;
  if (Robot.keyboardRead() == BUTTON_DOWN)
    State = 1;
  Serial.println (State);
}

Robot.keyBoardRead(), not Robot.keyoardRead().
Hope my noob comment helps.
Best regards!
Bobby

Edited 2 time(s). Last edit at 12/07/2015 07:03AM by BoByS.
Re: Arduino Robot?
December 15, 2015 09:34PM
Thank you for pointing that out, I'm still wondering if there's anyone ever tried my code and see if it really works
Sorry, only registered users may post in this forum.

Click here to login