You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am controlling 2 motors, and using your repo as arduino framework.
It looks like it works, but when using the functions setTime ( ) and call the current time with seconds(), the seconds() only updates every 4 seconds, or the time is running 4 times slower then my stopwatch.
this is my setup code:
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
setPrescaler(0, 1);
setPrescaler(1, 1);
setPrescaler(2, 1);
setTime(1, 0, 0, 1, 1, 1);
}
and this is my loop code
void loop(void)
{
// the motor only moves when you call update()
motor.update();
if(second() != currentS){
//move to next second
currentS = second();
motor.setPosition(currentS * 72);
}
}
when I disable the line setPrescaler(0, 1);
it runs perfectly, but activating it, suddenly slows down the clock by a factor 4
The text was updated successfully, but these errors were encountered:
Hi,
I am controlling 2 motors, and using your repo as arduino framework.
It looks like it works, but when using the functions setTime ( ) and call the current time with seconds(), the seconds() only updates every 4 seconds, or the time is running 4 times slower then my stopwatch.
this is my setup code:
and this is my loop code
when I disable the line setPrescaler(0, 1);
it runs perfectly, but activating it, suddenly slows down the clock by a factor 4
The text was updated successfully, but these errors were encountered: