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
thanks a lot for your code.
It will be very usefull for my current project.
The example is working perfectlly (after changing makefile to use attiny45 and setting fuses).
(i'm using linux, and avrdude as programer)
However, i noticed somthing that i can't understand :
this function is working :
int main()
{
Servo8Bit myServo; //create a servo object.
myServo.attach(1); //attach the servo to pin PB1
int nothing = 0;
while(1)
{
myServo.write(85); //rotate
delay(1000); //wait
myServo.write(95);
delay(1000);
}
}
but this function is not working :
int main()
{
Servo8Bit myServo; //create a servo object.
myServo.attach(1); //attach the servo to pin PB1
// int nothing = 0;
while(1)
{
myServo.write(85); //rotate
delay(1000); //wait
myServo.write(95);
delay(1000);
}
}
a dummy variable has to be declare, otherwise the code won't start.
Do you have a logic explanation?
best
The text was updated successfully, but these errors were encountered:
hello,
thanks a lot for your code.
It will be very usefull for my current project.
The example is working perfectlly (after changing makefile to use attiny45 and setting fuses).
(i'm using linux, and avrdude as programer)
However, i noticed somthing that i can't understand :
this function is working :
int main()
{
Servo8Bit myServo; //create a servo object.
myServo.attach(1); //attach the servo to pin PB1
int nothing = 0;
while(1)
{
myServo.write(85); //rotate
delay(1000); //wait
myServo.write(95);
delay(1000);
}
}
but this function is not working :
int main()
{
Servo8Bit myServo; //create a servo object.
myServo.attach(1); //attach the servo to pin PB1
// int nothing = 0;
while(1)
{
myServo.write(85); //rotate
delay(1000); //wait
myServo.write(95);
delay(1000);
}
}
a dummy variable has to be declare, otherwise the code won't start.
Do you have a logic explanation?
best
The text was updated successfully, but these errors were encountered: