The Adafruit Circuit Playground Bluefruit is a versatile and feature-rich development board that combines the functionality of various sensors and components with the ease of use of the Arduino environment. It is equipped with a Nordic nRF52840 processor with Bluetooth Low Energy (BLE) support, making it ideal for creating interactive projects and wearable devices that can connect to smartphones and tablets. With its built-in sensors, such as an accelerometer, temperature sensor, and capacitive touch pads, along with a suite of NeoPixels for colorful visual feedback, the Circuit Playground Bluefruit is a powerful platform for both beginners and experienced makers.
Pin Number | Function | Description |
---|---|---|
A1 | Analog Input | Capacitive touch sensor |
A2 | Analog Input | Capacitive touch sensor |
A3 | Analog Input | Capacitive touch sensor |
A4 | Analog Input | Capacitive touch sensor |
A5 | Analog Input | Capacitive touch sensor |
A6 | Analog Input | Capacitive touch sensor |
A7 | Analog Input | Capacitive touch sensor |
TX | Digital I/O | Transmit pin for serial communication |
RX | Digital I/O | Receive pin for serial communication |
13 | Digital I/O | Built-in LED, can be used for PWM |
Powering the Board:
Programming the Board:
Interacting with Onboard Sensors and Components:
Adafruit_LIS3DH
library.Using Bluetooth Functionality:
Adafruit_BluefruitLE_nRF51
or Adafruit_BluefruitLE_nRF52
library to enable BLE communication.Board not recognized by the computer:
Bluetooth not working:
Sensors not responding:
#include <Adafruit_CircuitPlayground.h>
void setup() {
// Initialize the Circuit Playground board
CircuitPlayground.begin();
}
void loop() {
// Read the value from the first capacitive touch sensor
int touchValue = CircuitPlayground.readCap(1);
// If the sensor is touched, turn on the built-in LED
if (touchValue > 30) {
CircuitPlayground.redLED(HIGH);
} else {
CircuitPlayground.redLED(LOW);
}
// Delay for a bit to avoid rapid toggling
delay(100);
}
Note: The above code is an example of using the capacitive touch sensor to control the built-in LED. The readCap()
function reads the capacitive touch sensor value, and the redLED()
function controls the built-in LED. Adjust the touch threshold value (30
in this case) as needed for your specific application.
Remember to wrap the code comments as needed to limit line length to 80 characters. This ensures readability and maintains a clean, professional appearance in the code.