I should be more specific.
I have my algorithm ready in pseudo code. I know how to program.
Its just the commands I need to use to tell my robot what to do.
Example (someone elses code here)
#define sensor_port PORTD
#define sensor_pin PIND
#define sensor_ddr DDRD
int forward()
{
PORTD&=~(_BV(Motor_L1)); //turn Off PD6
PORTD|=_BV(Motor_L2)|_BV(Motor_R2)|_BV(Motor_R1); //turn On PD7, PD4 and PD5
return 0;
}
int reverse()
{
PORTD&=~(_BV(Motor_L2)); //turn Off PD7
PORTD|=_BV(Motor_L1)|_BV(Motor_R1)|_BV(Motor_R2); //turn On PD6, PD5 and PD4
return 0;
}
What is _BV?
I realize that most of this is specific to what I connect to which pins, but theres a bunch of stuff in code snippets I've seen that just confuses me.