I think it may have something to do with not having the right ports set up for input/output. Is there a guide on how to configure each port individually for input/output.
I'm working off the commented $50 robot code but i cant quite figure out how to configure all ports from that:
//configure ports for input or output - specific to ATmega8
void configure_ports(void)
{
DDRC = 0x00; //configure all C ports for input
PORTC = 0x00; //make sure pull-up resistors are turned off
DDRD = 0xFF; //configure all D ports for output
DDRB = 0xC7; //configure B ports 0, 1, 2, 6, 7 for output (google search '0b11000111 to hex')
I'm not really sure how to configure individual ports or how to change between input/output