From df044ee0c3a8602ac3329a86ff6c62d3ec4568b0 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Fri, 10 Jun 2011 09:10:03 -0400 Subject: Docs: Use "BOARD_LED_PIN" instead of "13". Fix examples where pin 13 was used explicitly instead of BOARD_LED_PIN. Also change an AVR-specific example in docs/lang/cpp/booleanvariables.rst to Maple conventions. --- docs/source/lang/api/delay.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'docs/source/lang/api/delay.rst') diff --git a/docs/source/lang/api/delay.rst b/docs/source/lang/api/delay.rst index 9ef06a0..30bd436 100644 --- a/docs/source/lang/api/delay.rst +++ b/docs/source/lang/api/delay.rst @@ -42,17 +42,16 @@ Example :: - int ledPin = 13; // LED connected to pin 13 - void setup() { - pinMode(ledPin, OUTPUT); // sets the digital pin as output + // set up the built-in LED pin for output: + pinMode(BOARD_LED_PIN, OUTPUT); } void loop() { - digitalWrite(ledPin, HIGH); // sets the LED on - delay(1000); // waits for a second - digitalWrite(ledPin, LOW); // sets the LED off - delay(1000); // waits for a second + digitalWrite(BOARD_LED_PIN, HIGH); // sets the LED on + delay(1000); // waits for a second + digitalWrite(BOARD_LED_PIN, LOW); // sets the LED off + delay(1000); // waits for a second } .. _lang-delay-seealso: -- cgit v1.2.3