Alright, so I managed to connect the microcontroller to the PC using AVR ISP kit and AVR Studio 4, I've attached a screenshot. I click on 'Program' under Flash and it writes and verifies.... then I plug in my servos, turn on the battery pack (I'm using 4xAAs for the servos and 9V battery for the circuit and sensors).... but then nothing happens.... the robot doesn't "go". I used a multimeter to verify voltages, and the servos/sensors are definitely getting power.

I notice that when I click on the "Connect to AVR programmer" button in AVR Studio 4, connect always fails despite the COM port selection being correct... which makes me suspect that perhaps the program isn't properly written?

Additionally, I tried to use PonyProg2000 and that doesn't detect the microcontroller either, although I suspect that might have something to do with the fact that PonyProg2000 isn't compatible with AVR ISP kit.

The very first thing you need to do is verify that the AVR is working. The easiest way to do that is to hook an LED to one of the I/O pins of the AVR, and make it flash. That's basically the "Hello World" of the embedded world.

I suspect it would be a good idea (hint Admin) to add a flasher program to the tutorial, so people can verify that their build/program/power cycle is working with the least amount of extra complications thrown in there.

Once you get the flasher program working, then you can try and program and run with the full blown robot code, at least knowing that one variable is out of the way.

I've been doing embedded microcontrollers for almost 10 years, and I still invariably screw up something every time I build a new board, and end up using an LED flasher as the first application to help debug.

So when you click on 'Connect to AVR programmer' (Display the 'Connect' Dialog), make sure you select:Platform: STK500 or AVRISPPort: Auto

When you click Connect it should then figure it out . . .

But Im assuming you tried that and it didnt work.

Are you using the com port with another program simultaneously? For example, if hypterminal or ponyprog is already using that port, then AVR studio will not be able to use it. I make this dumb mistake all the time . . .

So when you program it, it programs and verifies correctly? The attached image is what it should look like if it was successful.

To test with a blinky LED, put this in your while loop and delete the other stuff:

OK I understand that you need to program it using the other screen by clicking on "Connect to Selected AVR Programmer" the thing is that it always says "Connect Failed", I attached a screenshot. I checked the microcontroller is getting 5V at Pin 7 and Pin 20/21 and that's not the problem.

The weird thing is I *think* the connection to the PC is working because that other dialog box comes up (the first screenshot I posted), but it can't connect to the AVR Programmer using that other option....

Haha damn this is weird... I used that LED code and that works! My LED is blinking on and off

I attached a screenshot and notice that I programmed it using the *other* dialog box, the one I posted originally, NOT the one where you click on "Connect to Selected AVR Programmer" (the one in the screenshot that Admin posted) as that one still fails as per my previous post.

But at least this shows that the program is "in" the microcontroller and working.... so it must be something wrong with the servos or the photoresistors? I'm not using the same servos and photoresistors as in the tutorial BTW (maybe that is making a difference?), here's a link to the ones I am using:

i=250;while(i>0){servo_left(24);i--;}Nothing happens, so what else can I try? Do I have to buy new servos (maybe they are busted)? They are definitely connected to Pin 2 and Pin 3 (Port 0 and 1 respectively).