Skip to content

adafruit/Adafruit_CircuitPlayground

Repository files navigation

Adafruit CircuitPlayground Library Build StatusDocumentation

Description

All in one library to control Adafruit's Circuit Playground board. Requires no other dependencies and exposes all Circuit Playground components in a simple to use class. Adafruit Circuit Playground Express is a high-level library that provides objects that represent CircuitPlayground hardware.

Installation

First Method

image

  1. In the Arduino IDE, navigate to Sketch > Include Library > Manage Libraries
  2. Then the Library Manager will open and you will find a list of libraries that are already installed or ready for installation.
  3. Then search for Circuit playground using the search bar.
  4. Click on the text area and then select the specific version and install it.

Second Method

  1. Navigate to the Releases page.
  2. Download the latest release.
  3. Extract the zip file
  4. In the Arduino IDE, navigate to Sketch > Include Library > Add .ZIP Library

Features

  • Complete Package

    Everything that is needed to run Arduino code on Circuit Playground is wrapped up into a tidy library that integrates all the sensing and lighting.

  • Self-contained

    Requires no other dependencies and exposes all Circuit Playground components in a simple to use class.

  • High-Level Library

    This high-level library provides objects that represent CircuitPlayground hardware.

  • Give back

    The library is free; you don’t have to pay for anything. However, if you want to support the development, or just thank the author of the library by purchasing products from Adafruit! Not only you’ll encourage the development of the library, but you’ll also learn how to best use the library and probably some C++ too

  • MIT License

    Adafruit playground library is open-source and uses one of the most permissive licenses so you can use it on any project.

    • Commercial use
    • Modification
    • Distribution
    • Private use

Functions

  • begin()
  • readCap()
  • redLED()
  • slideSwitch()
  • leftButton()
  • rightButton()
  • playTone()
  • lightSensor()
  • soundSensor()
  • motionX()
  • motionY()
  • motionZ()
  • temperature()
  • temperatureF()
  • colorWheel()
  • sensorColor()
  • isExpress()

Examples

There are many examples implemented in this library. One of the examples is below. You can find other examples here

soundPressureLevel.ino

#include <Adafruit_CircuitPlayground.h>
void setup() {
  CircuitPlayground.begin();
  Serial.begin(115200);
}
void loop() {
  Serial.println(CircuitPlayground.mic.soundPressureLevel(50));
}

Contributing

If you want to contribute to this project:

  • Report bugs and errors
  • Ask for enhancements
  • Create issues and pull requests
  • Tell others about this library
  • Contribute new protocols

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Credits

The author and maintainer of this library are Limor Fried/Ladyada and others for Adafruit Industries [email protected].

Based on previous work by:

  • T. DiCola
  • P. Y. Dragon
  • deanm1278
  • C. Nelson
  • E. Saadia
  • per1234
  • driveblock
  • C. Young
  • D. Cogliano

This is a library for the Adafruit CircuitPlayground boards:

Check out the links above for our tutorials and wiring diagrams.

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

License

This library is licensed under MIT license. All text above must be included in any redistribution.