Install a driver, board manager, and library for Circuit Playground.
Complete instructions can be found at our site. Installation tips start at page 17.
Step 2: Navigate to "color_sense" Example.
We will be using the "color_sense" program as a base for our project.
Adafruit Circuit Playground>>
Step 3: Adding Tones to the Color_sense Program.
The color_sense program makes use of the built in Light Sensor on the Circuit Playground and displays the color back on the board's 10 Neo Pixels when either button is pressed.
We will be inserting a few lines of code to make use of the built in Speaker. If the board detects a green color from the Light Sensor it will play a higher pitched "ding-ding-ding" sound. Anything not green will get a lower sounding "ding-dong" sound .
This code compares the intensity of green light to both the red and the blue readings. If green returns the highest value, the 3 dings will sound.
Copyright 2015 - Zagros Robotics, All Rights Reserved - Please send webpage comments or corrections to email@example.com - Zagros Robotics,12148 Lackland Road, St. Louis, MO 63146- 7342, (314)341-1836, firstname.lastname@example.org for answers to anyquestions.