Pages: 1 [2]   Go Down
Author Topic: Delay Functions making my mazebot crazy!?  (Read 896 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I still need my issue solved. Here is the code corrected (without too many spaces).

Code:
...
  else {

    TCCR2A |= _BV(COM2A1) | _BV(COM2B1);

    OCR2A = OCR2B = pwm;

  }

  savedPWM = pwm;

}

LOL.

Your idea of


"too many"



and mine



obviously differ.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have a rugged motor shield attached to my arduino.
So? You aren't listening.

I am listening, I was responding to the Parelleling from PeterH.

I am trying to get the robot to count once the sensor is triggered, and stop and reset once the sensor is released. Should changing the variable of Millis() around fix the entire issue? I need it to not count when the sensor is LOW.

Also, the code is not random. The shield can be found here: ruggedcircuits.com/html/rugged_motor_driver.html (which the setup is in my code).

And the loop is for responding to my two seperate touch sensors.

As for my logic in the program, what should I change around if it is not the delays? It was working fine before I added them  smiley-roll-sweat

Thanks
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 553
Posts: 46291
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I am listening
You've been asked more than once to remove excess white space. You haven't. Therefore, you aren't listening.
Logged

Pages: 1 [2]   Go Up
Jump to: