Coder Social home page Coder Social logo

adafruit_circuitplayground's Introduction

Adafruit Circuit Playground Library

Library to program Circuit Playground Classic and Circuit Playground Express in C++ with the Arduino IDE.

Installation

On the Arduino IDE (v. 1.8.5+) use the Library Manager in order to install this library. Documentation can be found on the Adafruit's learning

Usage

This Readme is not as exhaustive as the example code or the official documentation that can be found here (CPX) and here (CPC). It is intended to be a reference where to find the listing of the library's functions at a glance.

List of the methods in the Adafruit_CircuitPlayground class

  • Red LED

    • void redLED(boolean v)
  • Slide Switch

    • boolean slideSwitch(void)
  • Push Buttons

    • Left : boolean leftButton(void)
    • Right : boolean rightButton(void)
  • Light Sensor

    • uint16_t lightSensor(void)
  • Neopixels

    • void clearPixels(void)
    • void setPixelColor(uint8_t p, uint32_t c)
    • void setPixelColor(uint8_t p, uint8_t r, uint8_t g, uint8_t b)
    • void setBrightness(uint16_t b)
    • uint32_t colorWheel(uint8_t x)
    • Basic color detection:
      • void senseColor(uint8_t& red, uint8_t& green, uint8_t& blue)
      • uint32_t senseColor()
  • Capacitive touch

    • uint16_t readCap(uint8_t p, uint8_t samples=10)
  • Temperature sensor

    • Celsius : float temperature(void)
    • Farenheit float temperatureF(void)
  • Microphone

    • uint16_t soundSensor(void)
  • Buzzer

    • void playTone(uint16_t freq, uint16_t time, boolean wait=true)
  • Accelerometer

    • float motionX(void)
    • float motionY(void)
    • float motionZ(void)
  • Infra Red [Circuit Playground Express only]
    IR send and receive LEDs are used via the IRLib2 Library and are accessible via the irSend and irReceiver properties of the Adafruit_CircuitPlayground class

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.