From 210f3d2b1555bae87c9de27ea145e16d3bddb0f8 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Fri, 3 Dec 2010 20:18:00 -0500 Subject: cleaning up previous commits. note that addition of new files under docs/source/lang/api and docs/source/lang/cpp which were just copies of files in docs/source/lang/ imply that change history is lost to git. --- source/lang/digitalread.rst | 58 --------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 source/lang/digitalread.rst (limited to 'source/lang/digitalread.rst') diff --git a/source/lang/digitalread.rst b/source/lang/digitalread.rst deleted file mode 100644 index 3502587..0000000 --- a/source/lang/digitalread.rst +++ /dev/null @@ -1,58 +0,0 @@ -.. highlight:: cpp - -.. _lang-digitalread: - -digitalRead() -============= - -Reads the value from a specified digital pin, either :ref:`HIGH -` or :ref:`LOW `. - - -Library Documentation ---------------------- - -.. doxygenfunction:: digitalRead - - -Example -------- - -The following example turns the LED on when the button is pressed:: - - int ledPin = 13; // LED connected to Maple pin 13 - int buttonPin = 38; // BUT connected to Maple pin 38 - - void setup() { - pinMode(ledPin, OUTPUT); - pinMode(buttonPin, INPUT); - } - - void loop() { - int val = digitalRead(buttonPin); // reads the input pin - digitalWrite(ledPin, val); - } - -Note ----- - -If the pin isn't connected to anything, ``digitalRead()`` can return -either HIGH or LOW (and this can change in a way that seems random). - -Arduino Compatibility ---------------------- - -The Maple version of ``digitalRead()`` is compatible with Arduino. - - -See Also --------- - -- :ref:`pinMode ` -- :ref:`digitalWrite ` - - - - - -.. include:: cc-attribution.txt -- cgit v1.2.3