uploading code

Hello everyone,

I just bought the Arduino Duemilanove board. I want to control a dc motor with PWM. When i connect the board and try to upload the code the following error occurs :

avrdude: stk500_getsync(): not in sync: resp=0x00 avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

The code is :

int motorpin=6;

void setup() {



void loop() {





Please don't be harsh I'm just a rookie. :)

Have you gone through the Troubleshooting Guide... http://www.arduino.cc/en/Guide/Troubleshooting

I did already.I found out that I had something wrong with the drivers. Everything is ok now.

Thanx anyway