diff options
| author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-05-09 16:43:27 -0400 | 
|---|---|---|
| committer | Marti Bolivar <mbolivar@leaflabs.com> | 2011-05-09 16:49:08 -0400 | 
| commit | 19ea6ba4ea3f1ecb9830cf4d3e1366513f4f96e3 (patch) | |
| tree | a43f7e0fb3650ca54f245b750a078a0e8c356504 /docs/source/lang/unimplemented | |
| parent | 868fb1c273e562a1140abfa948022c9d4f55bccf (diff) | |
| parent | 1e2e177f6dae62e040c674b617744c73be187062 (diff) | |
| download | librambutan-19ea6ba4ea3f1ecb9830cf4d3e1366513f4f96e3.tar.gz librambutan-19ea6ba4ea3f1ecb9830cf4d3e1366513f4f96e3.zip  | |
Merge branch 'refactor'
This merges the libmaple refactor work into master.  The contents of
libmaple proper (/libmaple/) are almost completely incompatible with
previous APIs in master.  See /docs/source/libmaple/overview.rst for
more information on the new design.
Wirish incompatibilities are limited to the HardwareTimer class;
however, there are several new deprecations, most likely to be removed
in 0.1.0.
Diffstat (limited to 'docs/source/lang/unimplemented')
| -rw-r--r-- | docs/source/lang/unimplemented/notone.rst | 17 | ||||
| -rw-r--r-- | docs/source/lang/unimplemented/shiftout.rst | 136 | ||||
| -rw-r--r-- | docs/source/lang/unimplemented/tone.rst | 27 | 
3 files changed, 4 insertions, 176 deletions
diff --git a/docs/source/lang/unimplemented/notone.rst b/docs/source/lang/unimplemented/notone.rst index 485c9c5..8af878b 100644 --- a/docs/source/lang/unimplemented/notone.rst +++ b/docs/source/lang/unimplemented/notone.rst @@ -10,41 +10,28 @@ Stops the generation of a square wave triggered by  `tone <http://arduino.cc/en/Reference/Tone>`_\ (). Has no effect if  no tone is being generated. - -  **NOTE:** if you want to play different pitches on multiple pins,  you need to call noTone() on one pin before calling tone() on the  next pin. - -  Syntax  ------  noTone(pin) - -  Parameters  ----------  pin: the pin on which to stop generating the tone - -  Returns  ------- -nothing - - +Nothing. -See also +See Also  -------- -  -  `tone <http://arduino.cc/en/Reference/Tone>`_ () - -  .. include:: /lang/cc-attribution.txt diff --git a/docs/source/lang/unimplemented/shiftout.rst b/docs/source/lang/unimplemented/shiftout.rst deleted file mode 100644 index ff3852f..0000000 --- a/docs/source/lang/unimplemented/shiftout.rst +++ /dev/null @@ -1,136 +0,0 @@ -.. _lang-shiftout: - -shiftOut() -========== - -Description ------------ - -Shifts out a byte of data one bit at a time. Starts from either the -most (i.e. the leftmost) or least (rightmost) significant bit. Each -bit is written in turn to a data pin, after which a clock pin is -pulsed to indicate that the bit is available. - - - -This is a software implementation; Arduino (as of 0019) also -provides an `SPI library <http://arduino.cc/en/Reference/SPI>`_ -that uses the hardware implementation. - - - -Syntax ------- - -shiftOut(dataPin, clockPin, bitOrder, value) - - - -Parameters ----------- - -dataPin: the pin on which to output each bit (*int*) - - - -clockPin: the pin to toggle once the **dataPin** has been set to -the correct value (*int*) - - - -bitOrder: which order to shift out the bits; either **MSBFIRST** or -**LSBFIRST**. -(Most Significant Bit First, or, Least Significant Bit First) - - - -value: the data to shift out. (*byte*) - - - -Returns -------- - -None - - - -Note ----- - -The **dataPin** and **clockPin** must already be configured as -outputs by a call to -`pinMode <http://arduino.cc/en/Reference/PinMode>`_\ (). - - - -**shiftOut** is currently written to output 1 byte (8 bits) so it -requires a two step operation to output values larger than 255. - -:: - -    // Do this for MSBFIRST serial -    int data = 500; -    // shift out highbyte -    shiftOut(dataPin, clock, MSBFIRST, (data >> 8)); -    // shift out lowbyte -    shiftOut(data, clock, MSBFIRST, data); - -    // Or do this for LSBFIRST serial -    data = 500; -    // shift out lowbyte -    shiftOut(dataPin, clock, LSBFIRST, data); -    // shift out highbyte -    shiftOut(dataPin, clock, LSBFIRST, (data >> 8)); - - - -Example -------- - -*For accompanying circuit, see the `tutorial on controlling a 74HC595 shift register <http://arduino.cc/en/Tutorial/ShiftOut>`_.* - - - -:: - -    //**************************************************************// -    //  Name    : shiftOutCode, Hello World                         // -    //  Author  : Carlyn Maw,Tom Igoe                               // -    //  Date    : 25 Oct, 2006                                      // -    //  Version : 1.0                                               // -    //  Notes   : Code for using a 74HC595 Shift Register           // -    //          : to count from 0 to 255                            // -    //**************************************************************** - -    //Pin connected to ST_CP of 74HC595 -    int latchPin = 8; -    //Pin connected to SH_CP of 74HC595 -    int clockPin = 12; -    ////Pin connected to DS of 74HC595 -    int dataPin = 11; - -    void setup() { -      //set pins to output because they are addressed in the main loop -      pinMode(latchPin, OUTPUT); -      pinMode(clockPin, OUTPUT); -      pinMode(dataPin, OUTPUT); -    } - -    void loop() { -      //count up routine -      for (int j = 0; j < 256; j++) { -        //ground latchPin and hold low for as long as you are transmitting -        digitalWrite(latchPin, LOW); -        shiftOut(dataPin, clockPin, LSBFIRST, j); -        //return the latch pin high to signal chip that it -        //no longer needs to listen for information -        digitalWrite(latchPin, HIGH); -        delay(1000); -      } -    } - - - - -.. include:: /lang/cc-attribution.txt diff --git a/docs/source/lang/unimplemented/tone.rst b/docs/source/lang/unimplemented/tone.rst index f83bf6b..13d581e 100644 --- a/docs/source/lang/unimplemented/tone.rst +++ b/docs/source/lang/unimplemented/tone.rst @@ -12,70 +12,47 @@ continues until a call to  `noTone <http://arduino.cc/en/Reference/NoTone>`_\ (). The pin can be  connected to a piezo buzzer or other speaker to play tones. - -  Only one tone can be generated at a time. If a tone is already  playing on a different pin, the call to tone() will have no effect.  If the tone is playing on the same pin, the call will set its  frequency. - -  Use of the tone() function will interfere with PWM output on pins 3  and 11 (on boards other than the Mega). - -  **NOTE:** if you want to play different pitches on multiple pins,  you need to call noTone() on one pin before calling tone() on the  next pin. - -  Syntax  ------  tone(pin, frequency)  tone(pin, frequency, duration) - -  Parameters  ----------  pin: the pin on which to generate the tone - -  frequency: the frequency of the tone in hertz - -  duration: the duration of the tone in milliseconds (optional) - -  Returns  -------  nothing - - -See also +See Also  -------- -  -  `noTone <http://arduino.cc/en/Reference/NoTone>`_\ ()  -  `analogWrite <http://arduino.cc/en/Reference/AnalogWrite>`_\ ()  -  `Tutorial:Tone <http://arduino.cc/en/Tutorial/Tone>`_  -  `Tutorial:Pitch follower <http://arduino.cc/en/Tutorial/Tone2>`_  -  `Tutorial:Simple Keyboard <http://arduino.cc/en/Tutorial/Tone3>`_  -  `Tutorial: multiple tones <http://arduino.cc/en/Tutorial/Tone4>`_ - -  -  `Tutorial: PWM <http://arduino.cc/en/Tutorial/PWM>`_ - - -.. include:: /lang/cc-attribution.txt +.. include:: /arduino-cc-attribution.txt  | 
