aboutsummaryrefslogtreecommitdiffstats
path: root/docs/source/lang/api/constants.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/source/lang/api/constants.rst')
-rw-r--r--docs/source/lang/api/constants.rst36
1 files changed, 11 insertions, 25 deletions
diff --git a/docs/source/lang/api/constants.rst b/docs/source/lang/api/constants.rst
index 72738b8..00c1a5c 100644
--- a/docs/source/lang/api/constants.rst
+++ b/docs/source/lang/api/constants.rst
@@ -61,14 +61,6 @@ pin is configured as an ``INPUT`` (using :ref:`pinMode()
<lang-digitalread>`, the microcontroller will report ``HIGH`` if a
voltage of 3 volts or more is present at the pin.
-.. TODO? Following seems false; check it out sometime, leave out for now:
-
-.. A pin may also be configured as an ``INPUT`` with ``pinMode()``, and
-.. subsequently made ``HIGH`` with :ref:`digitalWrite()
-.. <lang-digitalwrite>`, this will set the internal pullup resistors,
-.. which will *steer* the input pin to a HIGH reading unless it is pulled
-.. LOW by external circuitry.
-
When a pin is configured to ``OUTPUT`` with pinMode, and set to
``HIGH`` with :ref:`digitalWrite() <lang-digitalwrite>`, the pin is at
3.3 volts. In this state it can *source* current, e.g. light an LED
@@ -301,23 +293,16 @@ exponent indicators. Some examples are given in the following table:
Board-Specific Constants
------------------------
-This section documents constants whose value might change across
-different LeafLabs boards. You can use these constants to help ensure
-that your code will be portable across different boards.
-
-.. TODO replace "upcoming" when Mini, Native come out
-
-.. _lang-constants-led:
-
-- ``BOARD_LED_PIN``: the number of the pin which connects to the
- built-in LED. On the Maple, this is pin 13, but it's not guaranteed
- to be the same in upcoming boards like the Maple Mini.
-
-.. _lang-constants-but:
+There are several :ref:`board-specific constants <lang-board-values>`
+whose value depends on which LeafLabs board you have. If you use
+them, it will help make sure that your code will work well on all
+LeafLabs boards, not just the one you have. This will make it much
+easier to share your code with others.
-- ``BOARD_BUTTON_PIN``: the number of the pin which connects to the
- built-in button (labeled "BUT"). On the Maple, this is pin 38, but
- it's not guaranteed to be the same in other boards.
+For example, the pin number connected to the board's built-in LED is
+different on the different boards, but the board-specific constant
+:ref:`BOARD_LED_PIN <lang-board-values-led>` will always be the
+correct value for each board.
See Also
--------
@@ -333,5 +318,6 @@ See Also
- :ref:`unsigned long long <lang-unsignedlonglong>`
- :ref:`float <lang-float>`
- :ref:`double <lang-double>`
+- :ref:`Board-Specific Values <lang-board-values>`
-.. include:: cc-attribution.txt
+.. include:: /arduino-cc-attribution.txt