From d968c7a8eee7f334ce7c3f9fcaba58c81f207630 Mon Sep 17 00:00:00 2001 From: "Randall Bohn (Huckle)" Date: Sat, 18 Feb 2012 07:18:29 -0700 Subject: [PATCH] Don't start_pmode if we're already in pmode. --- .../examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino b/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino index 622d7cd35..060ad77ac 100644 --- a/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino +++ b/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino @@ -66,7 +66,7 @@ void pulse(int pin, int times); void setup() { - Serial.begin(19200); + Serial.begin(9600); pinMode(LED_PMODE, OUTPUT); pulse(LED_PMODE, 2); pinMode(LED_ERR, OUTPUT); @@ -510,9 +510,13 @@ int avrisp() { fill(5); empty_reply(); break; - case 'P': - start_pmode(); + if (pmode) { + pulse(LED_ERR, 3); + } + else { + start_pmode(); + } empty_reply(); break; case 'U': // set address (word)