Go Down

Topic: Delay Functions making my mazebot crazy!? (Read 2502 times) previous topic - next topic


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

Code: [Select]

  else {

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

    OCR2A = OCR2B = pwm;


  savedPWM = pwm;



Your idea of

"too many"

and mine

obviously differ.

Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics


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:



I am listening

You've been asked more than once to remove excess white space. You haven't. Therefore, you aren't listening.
The art of getting good answers lies in asking good questions.

Go Up