|
Re: Trouble with Autonomous
I can almost assure you the problem has to do with your equation in the line "int time...." you're generating a float in the middle of it (30/300)= 0.1, which the integer math in the PIC reduces to 0, before continuing with the rest of the math.
As for how to fix it, you could multiply all the numbers involved by say 1000, and divide by 1000 as your last step... or... something.
|