diff options
| author | Marti Bolivar <mbolivar@mit.edu> | 2010-11-21 01:40:37 -0500 |
|---|---|---|
| committer | Marti Bolivar <mbolivar@mit.edu> | 2010-11-21 01:40:37 -0500 |
| commit | 19e8336afbc827378216aca2b1af45ef89a108ab (patch) | |
| tree | 5aeb911d2f697ab3bf6ad9cf3609c19fe7a83346 /docs/source/arduino/constants.rst | |
| parent | b2653be281539928a7ba92433fe2b7c2e3ef4cd4 (diff) | |
| download | librambutan-19e8336afbc827378216aca2b1af45ef89a108ab.tar.gz librambutan-19e8336afbc827378216aca2b1af45ef89a108ab.zip | |
updated serial bootloader spec; other improvements
Diffstat (limited to 'docs/source/arduino/constants.rst')
| -rw-r--r-- | docs/source/arduino/constants.rst | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/docs/source/arduino/constants.rst b/docs/source/arduino/constants.rst index 3a819b3..e841c9b 100644 --- a/docs/source/arduino/constants.rst +++ b/docs/source/arduino/constants.rst @@ -103,7 +103,7 @@ Digital pins can be used either as **INPUT** or **OUTPUT**. Changing a pin from INPUT TO OUTPUT with pinMode() drastically changes the electrical behavior of the pin. - +.. _arduino-constants-input: Pins Configured as Inputs ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -115,7 +115,7 @@ circuit that they are sampling, say equivalent to a series resistor of 100 Megohms in front of the pin. This makes them useful for reading a sensor, but not powering an LED. - +.. _arduino-constants-output: Pins Configured as Outputs ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -132,7 +132,7 @@ of current provided by an Atmega pin is also not enough to power most relays or motors, and some interface circuitry will be required. -.. _arduino-fpconstants: +.. _arduino-constants-fp: Floating-Point Constants ------------------------ @@ -141,28 +141,26 @@ Similar to integer constants, floating point constants are used to make code more readable. Floating point constants are swapped at compile time for the value to which the expression evaluates. +.. TODO explain that floating point literals are doubles +.. _arduino-constants-fp-f: -Examples: - +.. TODO f modifiers +Examples: ``n = .005;`` - - Floating point constants can also be expressed in a variety of scientific notation. 'E' and 'e' are both accepted as valid exponent indicators. - - :: - + floating-point evaluates to: also evaluates to: - constant - + constant + 10.0 10 2.34E5 2.34 * 10^5 234000 67e-12 67.0 * 10^-12 .000000000067 @@ -301,4 +299,4 @@ See also - `unsigned long <http://arduino.cc/en/Reference/UnsignedLong>`_ -.. include:: cc-attribution.txt
\ No newline at end of file +.. include:: cc-attribution.txt |
