|
Re: Delay code isn't delaying.
It cycles 40 times a second right? So you can just make a function that returned i / 40 so you can say if(timer < 2) which would be the actual amount of seconds. I know it's basic math to just multiply by 40, but it makes the code a little more readable for someone that doesn't know that.
__________________

Life lessons learned at robot:
1.) Never take apart power strips
2.) Sleep is required, but not essential to survival
Failure to abide by these lessons will result in headaches...and flaming pants.
"Here at Bobcat Robotics, we pride ourselves in having 60-table MySQL databases, girlfriend cookies, and a vinyl cutter." -Chris Jelly
|