Let's start with A0 which is in the bottom right corner, and work our way counter-clockwise
A0 (a.k.a D12) - This is a special pin that can do true analog output so it's great for playing audio clips. In can be digital I/O, or analog I/O, but if you do that it will interfere with the built-in speaker. This is the one pin that cannot be used for capacitive touch.
A1 / D6 - This pin can be digital I/O, or analog Input. This pin has PWM output and can be capacitive touch sensor
A2 / D9 - This pin can be digital I/O, or analog Input. This pin has PWM output and can be capacitive touch sensor
A3 / D10 - This pin can be digital I/O, or analog Input. This pin has PWM output and can be capacitive touch sensor
A4 / D3 - This pin can be digital I/O, or analog Input. This pin is also the I2C SCL pin, and can be capacitive touch sensor
A5 / D2 - This pin can be digital I/O, or analog Input. This pin is also the I2C SDA pin, and can be capacitive touch sensor
A6 / D0 - This pin can be digital I/O, or analog Input. This pin has PWM output, Serial Receive, and can be capacitive touch sensor
A7 / D1 - This pin can be digital I/O, or analog Input. This pin has PWM output, Serial Transmit, and can be capacitive touch sensor
The google drive folder (to the right) has all the Arduino sketches.
CPBlinkAllNeoPixels
blinks all the onboard neopixels
CPBlinkNeoPixel
blinks a single neopixel (set the index value using the variable neopixel at the top)
CPCapLights
Allows capacitive touch to the 7 pads on the CPE and lights the closest onboard neopixel in response
See below for how to extend the touch to copper tape
CPCapPiano
Allows capacitive touch to the 7 pads on the CPE and plays a note in response using the onboard Piezo buzzer
CPColorLightExternal
Adapts CPColorMatch to light an external LED (or fairy light strand) in response to matching the color red
Attach the external LED/fairy light to pin A1
CPColorMatch
Senses color and matches it to the closest color in an array.
When modifying the colors to try to match to, you need to use the:
colorValues for RGB triples
numColors for the length of the array/number of colors
colorNames to hold corresponding color names
CPColorSpeak
Adapts the Color match to sense red, green and yellow (or no match)
Speaks "The color is red/green/yellow" upon finding a matching color.
CPLightSensor
Turns an external LED on when there is low light
CPMicroServoSweep
Controls an external microservo
See below for more info
CPPianoNotes
Upon turning on, plays a scale of notes
CPSoundBeatsLights
All onboard neopixels turn on in response to (loud) sounds
CPsoundLED
Onboard neopixels turn on in response to sounds - more lights with louder sounds
Here's an example for how to use a paper circuit with the CPE -- you can use alligator clips to connect to the copper tape.
To make a better connection for the LED onto the paper circuit:
Use needle nose pliers to curl the LED leads.
Be sure you know which one is positive and which is negative!
Then, rest the LED on copper tape and use a small piece to "sandwich" the curled leads and make a decent connection.
Here's another example that shows how to connect two LEDs (in parallel).
You may need to play with the threshold value. If it's too low, then it will be very sensitive; sometimes just attaching an alligator clip will count as a "touch." In this case, use the Serial monitor to determine a better threshold value.
Micro Servo 9g SG90 (in Elegoo kits)
Load the CPESweep code onto the CPE.
Unplug EVERYTHING!
Attach your wires from the Servo to the CPE:
GND to GND (brown in the image)
Voltage to 3.3V (red in the image)
PWM control to A1 (orange in the image)
Double-check your connections and make sure no metal is touching other metal that you don't want!
Plug in the CPE to power (via USB or external battery)
You should see the motor sweep back and forth now!