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

Updated Arduino libraries

Location:
trunk/Arduino/libraries/Adafruit_Circuit_Playground
Files:
6 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'.
  • trunk/Arduino/libraries/Adafruit_Circuit_Playground/README.md

    r3 r20  
    1 # Adafruit CircuitPlayground Library [![Build Status](https://travis-ci.org/adafruit/Adafruit_CircuitPlayground.svg?branch=master)](https://travis-ci.org/adafruit/Adafruit_CircuitPlayground)
     1# Adafruit CircuitPlayground Library [![Build Status](https://travis-ci.com/adafruit/Adafruit_CircuitPlayground.svg?branch=master)](https://travis-ci.com/adafruit/Adafruit_CircuitPlayground)
    22
    33<img src="https://cdn-shop.adafruit.com/970x728/3333-01.jpg" height="300"/>
  • trunk/Arduino/libraries/Adafruit_Circuit_Playground/library.properties

    r3 r20  
    11name=Adafruit Circuit Playground
    2 version=1.8.4
     2version=1.8.6
    33author=Adafruit
    44maintainer=Adafruit <info@adafruit.com>
  • trunk/Arduino/libraries/Adafruit_Circuit_Playground/utility/Adafruit_CPlay_LIS3DH.h

    r3 r20  
    180180  uint8_t spixfer(uint8_t x = 0xFF);
    181181
    182 
    183   int32_t _sensorID;
    184   int8_t  _i2caddr;
    185 
    186182  // SPI
    187183  int8_t _cs, _mosi, _miso, _sck;
     184
     185  int8_t  _i2caddr;
     186  int32_t _sensorID;
    188187};
    189188
  • trunk/Arduino/libraries/Adafruit_Circuit_Playground/utility/Adafruit_CPlay_NeoPixel.cpp

    r3 r20  
    713713// table (in flash memory) holding an 8-bit unsigned sine wave (0-255).
    714714static const int _SBASE_ = __COUNTER__ + 1; // Index of 1st __COUNTER__ below
    715 #define _S1_ (sin((__COUNTER__ - _SBASE_) / 128.0 * M_PI) + 1.0) * 127.5 + 0.5,
     715#define _S1_ (uint8_t) ((sin((__COUNTER__ - _SBASE_) / 128.0 * M_PI) + 1.0) * 127.5 + 0.5),
    716716#define _S2_ _S1_ _S1_ _S1_ _S1_ _S1_ _S1_ _S1_ _S1_ // Expands to 8 items
    717717#define _S3_ _S2_ _S2_ _S2_ _S2_ _S2_ _S2_ _S2_ _S2_ // Expands to 64 items
    … …  
    721721#define _GAMMA_ 2.6
    722722static const int _GBASE_ = __COUNTER__ + 1; // Index of 1st __COUNTER__ below
    723 #define _G1_ pow((__COUNTER__ - _GBASE_) / 255.0, _GAMMA_) * 255.0 + 0.5,
     723#define _G1_ (uint8_t) (pow((__COUNTER__ - _GBASE_) / 255.0, _GAMMA_) * 255.0 + 0.5),
    724724#define _G2_ _G1_ _G1_ _G1_ _G1_ _G1_ _G1_ _G1_ _G1_ // Expands to 8 items
    725725#define _G3_ _G2_ _G2_ _G2_ _G2_ _G2_ _G2_ _G2_ _G2_ // Expands to 64 items
  • trunk/Arduino/libraries/Adafruit_Circuit_Playground/utility/talkie.cpp

    r3 r20  
    99#define USEC  ((1000000 + (FS / 2)) / FS) // Sample period (microseconds)
    1010
    11 static const int16_t PROGMEM
     11static const uint16_t PROGMEM
    1212  tmsK1[]     = {0x82C0,0x8380,0x83C0,0x8440,0x84C0,0x8540,0x8600,0x8780,
    1313                 0x8880,0x8980,0x8AC0,0x8C00,0x8D40,0x8F00,0x90C0,0x92C0,
    … …  
    1919                 0x69C0,0x6CC0,0x6F80,0x71C0,0x73C0,0x7580,0x7700,0x7E80};
    2020
    21 static const int8_t PROGMEM
     21static const uint8_t PROGMEM
    2222  tmsK3[]     = {0x92,0x9F,0xAD,0xBA,0xC8,0xD5,0xE3,0xF0,
    2323                 0xFE,0x0B,0x19,0x26,0x34,0x41,0x4F,0x5C},
Note: See TracChangeset for help on using the changeset viewer.