Thread: loop problems
View Single Post
  #1   Spotlight this post!  
Unread 09-02-2006, 13:30
Max Brin Max Brin is offline
Registered User
FRC #1943 (Neat Team)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Israel
Posts: 52
Max Brin has a spectacular aura aboutMax Brin has a spectacular aura aboutMax Brin has a spectacular aura about
loop problems

Hey guys,

I had some problems using the timers and I need something that will take time asap, so I did this:

Code:
void pulse(void)
{
pwm06=255;
for (int i=0;i<30;i++)
	{
	if (i == 29)
		{
		pwm06=127;
		}
	}
}
It means the pwm06 will get 255 and when it gets to 29 it will stop.
It will take about 0.5 second right?
anyways I get a syntax error, can somebody help me?

Thanks!