Go Down

Topic: Code not running properly (Read 2 times) previous topic - next topic

bill2009

If the upload works ok the bootloader - which is a pretty healthy piece of code - is executing fine.

Try a sketch that just does serial prints and see if you see them in the monitor. Try blinking a different pin.

What do you mean by shorting the isp header?

Coding Badly


LED on or off...

Code: [Select]
void setup()
{
  pinMode(13, OUTPUT);
  digitalWrite(13, HIGH);
}

void loop()
{
  digitalWrite(13, LOW);
}

shocklateboy92

Quote
What do you mean by shorting the isp header?

I accidentally touched the pins labeled ICSP with my pliers while it was on.

Quote
LED on or off...

In that sketch, the LED stayed off.

To make sure it wasn't something wrong with my computer/OS, I tried a different one. (This time, running windows).

Everything worked properly for a little while, but then it died again :(
(Sketches now cause random results)

I uploaded a sketch with lots of Serial output, but then I just saw the letter 'ÿ' being repeated over and over again on the serial monitor.

PaulS

Quote
I uploaded a sketch with lots of Serial output, but then I just saw the letter 'ÿ' being repeated over and over again on the serial monitor.

This character is what appears when you Serial.print() a -1 as a character, which is what happens if you use Serial.print(Serial.read()) without checking Serial.available() first.

Show the code...

Grumpy_Mike

#9
Jan 13, 2011, 03:06 pm Last Edit: Jan 13, 2011, 03:06 pm by Grumpy_Mike Reason: 1
Pin 13 is part of the ICSP so if you have fried those pins that will explain why your blink will not work. Try connecting an LED (with resistor) to pin 2 to 9 and see if you can get it to blink.

Go Up