I skipped the atmel8 and went for the 168 instead, also i bought continuous rotation servos.
the admin says:
'The global.h file should also be modified since it contains a F_CPU define, depending on if you use the makefile to overwrite that value or not.'
I have made all the other modifications for the 168 but I am not sure what value I am suppose to change the F_CPU to.
Also for the delay function:
//************DELAY FUNCTIONS************
//wait for X amount of cycles (23 cycles is about .992 milliseconds)
//to calculate: 23/.992*(time in milliseconds) = number of cycles
void delay_cycles(unsigned long int cycles)
{
while(cycles > 0)
cycles--;
}
//***************************************
how does that change with the 168? and, can somebody explain to me how do you come up with the formula. I have check many posts but I do not seem to get it. I have finish building the board for the 50$ robot and connected the servos and they work fine with the code without the modification to the global.g but I'd like to understand better the delay.
Also, what is the difference between delay_cycles and the delay_ms that the admin uses here:
Code:
while(1)
{
wheel_left(30);
delay_ms(20);
}
Can somebody help me please???