Stop serial data from arriving for the first few seconds when the board powers

I'm working my way through the Arduino Starter Kit having just completed project 4 Color Mixing Lamp that loops reading analog values from the photoresitors and printing to the serial monitor. I try to clear the memory loading the Blink Sketch. It Verifies and Uploads, but the Arduino does not start. From the troubleshooting page on Arduino, I conclude that the serial monitor is sending serial data to the board when it first turns on. The bootloader is listening the first few seconds for the computer to send it a new sketch to be uploaded. The bootloader does not timeout and start the sketch because data from the last sketch is continuing to send data to the bootloader. How do I get it to stop sending data?

 

I thought if I burned the sketch with an external programmer I could fix it. I tried tried creating an ISP programmer with Arduinos instructions: "From Arduino to a Microcontroller on a Breadboard \ Minimal Circuit (Eliminating the External Clock)". I can't  Verify and Upload ArduinoISP sketch for the same reasons listed above.

What should I try? Should I try connecting the RX directly to the TX pin? This was mentioned as a solution if I saw garbage data coming in. 

reset button?

did you try using the reset button when uploading the new sketch?  I don’t know if your arduino is properly pulling the reset pin low before the upload.  what board are you using?

Yes. I’ve tried hitting the

Yes. I’ve tried hitting the reset button at different times between 0-6 seconds before and 0-6 after to no avail. Using Arduino UNO R3 board with Atmega 328P-PU.

ARDUINO PROJECTS

ARDUINO PROJECTS BOOK

 

photo.jpg

photo__1_.jpg

SKETCH:

const int greenLEDPin = 9;

const int redLEDPin = 11;

const int blueLEDPin = 10;

 

const int redSensorPin = A0;

const int greenSensorPin = A1;

const int blueSensorPin = A2;

 

int redValue = 0;

int greenValue = 0;

int blueValue = 0;

 

int redSensorValue = 0;

int greenSensorValue = 0;

int blueSensorValue = 0;

 

void setup(){

  Serial.begin(9600);

 

  pinMode(greenLEDPin, OUTPUT);

  pinMode(redLEDPin, OUTPUT);

  pinMode(blueLEDPin, OUTPUT);

}

 

void loop(){

 redSensorValue = analogRead(redSensorPin);

 delay(5);

 greenSensorValue = analogRead(greenSensorPin);

 delay(5);

 blueSensorValue = analogRead(blueSensorPin);

 

 Serial.print("Raw Sensor Values \t Red: ");

 Serial.print(redSensorValue);

 Serial.print("\t Green: ");

 Serial.print(greenSensorValue);

 Serial.print("\t Blue: ");

 Serial.println(blueSensorValue);

 

 redValue = redSensorValue/4;

 greenValue = greenSensorValue/4;

 blueValue = blueSensorValue/4;

 

 Serial.print("Mapped Sensor Values \t Red: ");

 Serial.print(redValue);

 Serial.print("\t Green: ");

 Serial.print(greenValue);

 Serial.print("\t Blue: ");

 Serial.println(blueValue);

 

 analogWrite(redLEDPin, redValue);

 analogWrite(greenLEDPin, greenValue);

 analogWrite(blueLEDPin, blueValue);

 

}

I tried resetting againand

I tried resetting againand then as soon as the L LED blinked three times I immediately pressed the Upload button. I had been pressing CTL+R for it to verify and then upload. When I just pressed the Upload button the TX & RX flashed and it uploaded the sketch.

 

I do want to look into OddBots solution so that I won’t have to keep playing with the timing of the upload. Thank you.

you shouldn’t have to push reset

the arduino has a built in capacitor to pull the reset low from the usb interdace, but some times arduinos get buggy like if you disconnect before the sketch uploads or something.  another solution instead of buying a whole arduino is to just buy an atmega328p-pu chip with the bootloader on it.  they only cost about $6 then you can swap your chip out and burn the bootloader again using a similar method to what OB posted and your messed up chip on a breadboard.

http://arduino.cc/en/Tutorial/ArduinoToBreadboard