The Adafruit Circuit Playground Express 4-H is a versatile and user-friendly development board that integrates a multitude of sensors, input/output devices, and an ATmega32u4 microcontroller. This board is specifically tailored for educational environments, aiming to provide an engaging and accessible introduction to electronics and programming. It is suitable for a wide range of applications, from simple LED animations to complex sensor-based projects.
Common applications include:
Pin Number | Function | Description |
---|---|---|
A1 | Light Sensor | Analog input for measuring ambient light |
A2 | Temperature | Analog input for measuring temperature |
A3 | Microphone | Analog input for sound level |
A4 | Accelerometer X | Analog input for X-axis acceleration |
A5 | Accelerometer Y | Analog input for Y-axis acceleration |
A6 | Accelerometer Z | Analog input for Z-axis acceleration |
A7 | Unused | Reserved for future use |
D1-D6 | Digital I/O | Digital input/output pins, PWM capable (D1-D6) |
D7 | Slide Switch | Digital input for slide switch position |
D8 | Left Button | Digital input for left button press |
D9 | Right Button | Digital input for right button press |
D10-D12 | NeoPixels | Control pins for built-in NeoPixel LEDs |
D13 | Built-in LED | Digital output for onboard LED |
RX/TX | Serial Comm | Receive/Transmit for serial communication |
To use the Adafruit Circuit Playground Express 4-H in a circuit:
Q: Can I power the Circuit Playground Express 4-H with a battery? A: Yes, you can use a 3.7V lithium polymer battery or 3x AAA batteries with a battery holder.
Q: How do I program the Circuit Playground Express 4-H? A: You can use the Arduino IDE, CircuitPython, or Microsoft MakeCode to program the board.
Q: What is the maximum current the NeoPixels can draw? A: Each NeoPixel can draw up to 60 mA at full brightness. With 10 NeoPixels, the maximum current is 600 mA.
Q: Are the components on the board replaceable if they get damaged? A: The onboard components are not designed to be user-replaceable. Care should be taken to avoid damaging them.
Below is a simple example code that demonstrates how to blink the onboard LED using the Arduino IDE. This code is intended for educational purposes to get started with programming the Adafruit Circuit Playground Express 4-H.
#include <Adafruit_CircuitPlayground.h>
void setup() {
// Initialize the Circuit Playground board.
CircuitPlayground.begin();
}
void loop() {
// Turn the onboard LED on.
CircuitPlayground.setPixelColor(0, 255, 255, 255); // White color
delay(500); // Wait for half a second
// Turn the onboard LED off.
CircuitPlayground.setPixelColor(0, 0, 0, 0); // No color (off)
delay(500); // Wait for half a second
}
Remember to install the Adafruit Circuit Playground library in the Arduino IDE before uploading this code to the board. This example assumes that the first NeoPixel (index 0) is being used as the onboard LED.
For more advanced examples and tutorials, visit the Adafruit Learning System at https://learn.adafruit.com/.