Ignore:
Timestamp:
Sep 10, 2019, 11:25:01 AM (7 years ago)
Author:
markus
Message:

Updated Arduino libraries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Arduino/libraries/Adafruit_Circuit_Playground/Adafruit_CircuitPlayground.cpp

    r3 r20  
    88 * This is the documentation for Adafruit's CircuitPlayground driver for the
    99 * Arduino platform.  It is designed specifically to work with the
    10  * Adafruit CircuitPlayground boards: 
     10 * Adafruit CircuitPlayground boards:
    1111 *  - https://www.adafruit.com/products/3000
    1212 *  - https://www.adafruit.com/products/3333
    … …  
    3131
    3232/**************************************************************************/
    33 /*! 
     33/*!
    3434    @brief  Set up the CircuitPlayground hardware
    3535    @param  brightness Optional brightness to set the neopixels to
    … …  
    5151  irReceiver=IRrecvPCI(CPLAY_IR_RECEIVER);
    5252  irDecoder=IRdecode();
     53  // since we aren't calling speaker.begin() anymore, do this here
     54  pinMode(CPLAY_SPEAKER_SHUTDOWN, OUTPUT);
     55  digitalWrite(CPLAY_SPEAKER_SHUTDOWN, HIGH);
    5356#endif
    5457
    … …  
    8689
    8790/**************************************************************************/
    88 /*! 
     91/*!
    8992    @brief  read capacitive touch sensor
    9093    @param  p the pin to read. Must be a captouch enabled pin.
    … …  
    126129
    127130/**************************************************************************/
    128 /*! 
     131/*!
    129132    @brief turn on or off the red LED on pin #13
    130133    @param  v pass true to turn LED on, false to turn LED off
    … …  
    136139
    137140/**************************************************************************/
    138 /*! 
     141/*!
    139142    @brief read the slide switch
    140143    @returns true if slide switch in set, false if not
    … …  
    146149
    147150/**************************************************************************/
    148 /*! 
    149     @brief read the left button 
     151/*!
     152    @brief read the left button
    150153    @returns true if button is pressed, false if not
    151154*/
    … …  
    156159
    157160/**************************************************************************/
    158 /*! 
     161/*!
    159162    @brief read the right button
    160163    @returns true if button is pressed, false if not
    … …  
    166169
    167170/**************************************************************************/
    168 /*! 
     171/*!
    169172    @brief play a tone on the onboard buzzer
    170173    @param  freq the frequency to play
    171174    @param  time the duration of the tone in milliseconds
    172175    @param  wait Optional flag to wait for time milliseconds after playing the tone. Defaults to true.
    173     @note The driver circuitry is an on/off transistor driver, so you will only be able to play square waves. 
     176    @note The driver circuitry is an on/off transistor driver, so you will only be able to play square waves.
    174177    It is also not the same loudness over all frequencies but is designed to be the loudest at around 4 KHz
    175178*/
    … …  
    208211  lo2     = (ocr >> 1) & 0xFF;
    209212  noInterrupts();                     // TC4H accesses MUST be atomic
    210   TC4H    = hi1;     
     213  TC4H    = hi1;
    211214  OCR4C   = lo1;                      // TOP
    212   TC4H    = hi2;     
     215  TC4H    = hi2;
    213216  OCR4A   = lo2;                      // 50% duty
    214217  interrupts();
    … …  
    225228
    226229/**************************************************************************/
    227 /*! 
     230/*!
    228231    @brief read the onboard lightsensor
    229232    @returns value between 0 and 1023 read from the light sensor
    230     @note 1000 Lux will roughly read as 2 Volts (or about 680 as a raw analog reading). 
    231       A reading of about 300 is common for most indoor light levels. 
    232       Note that outdoor daylight is 10,000 Lux or even higher, so this sensor is best 
     233    @note 1000 Lux will roughly read as 2 Volts (or about 680 as a raw analog reading).
     234      A reading of about 300 is common for most indoor light levels.
     235      Note that outdoor daylight is 10,000 Lux or even higher, so this sensor is best
    233236      suited for indoor light levels!
    234237*/
    … …  
    239242
    240243/**************************************************************************/
    241 /*! 
     244/*!
    242245    @brief read the onboard sound sensor. A reading of ~0 is silent, and
    243246    loud audio will result in a reading between -500 and 500 or so.
    … …  
    252255
    253256/**************************************************************************/
    254 /*! 
     257/*!
    255258    @brief read the X parameter of the onboard accelerometer. Value returned is
    256259     defined by setAccelRange().
    … …  
    265268
    266269/**************************************************************************/
    267 /*! 
     270/*!
    268271    @brief read the Y parameter of the onboard accelerometer. Value returned is
    269272     defined by setAccelRange().
    … …  
    278281
    279282/**************************************************************************/
    280 /*! 
     283/*!
    281284    @brief read the Z parameter of the onboard accelerometer. Value returned is
    282285     defined by setAccelRange().
    … …  
    291294
    292295/**************************************************************************/
    293 /*! 
     296/*!
    294297    @brief read the onboard thermistor.
    295298    @returns temperature reading in Centigrade.
    … …  
    322325
    323326/**************************************************************************/
    324 /*! 
     327/*!
    325328    @brief read the onboard thermistor.
    326329    @returns temperature reading in Farenheight.
    … …  
    333336
    334337/**************************************************************************/
    335 /*! 
     338/*!
    336339    @brief get a color value from the color wheel.
    337340    @param WheelPos a value 0 to 255
    … …  
    353356
    354357/**************************************************************************/
    355 /*! 
     358/*!
    356359    @brief detect a color value from the light sensor
    357360    @param red the pointer to where the red component should be stored.
    358361    @param green the pointer to where the green component should be stored.
    359     @param blue the pointer to where the blue component should be stored.   
     362    @param blue the pointer to where the blue component should be stored.
    360363    @returns the components of the detected colors in the passed pointers.
    361364*/
    … …  
    395398
    396399/**************************************************************************/
    397 /*! 
     400/*!
    398401    @brief check whether or not this device is a CircuitPlayground Express.
    399402    @returns True if the device is a CircuitPlayground Express, false if it is a 'classic'.
Note: See TracChangeset for help on using the changeset viewer.