The Adafruit nRF52840 CLUE is a versatile development board that harnesses the power of the Nordic Semiconductor nRF52840 Bluetooth System on Chip (SoC). This board is designed for a wide range of applications, from IoT devices to wearable technology, thanks to its rich set of features including Bluetooth Low Energy (BLE), a plethora of sensors, and a user-friendly display. It is an ideal platform for prototyping and developing sophisticated projects that require wireless connectivity and sensor integration.
Pin Number | Function | Description |
---|---|---|
1 | GND | Ground |
2 | VOUT | Regulated 3.3V output |
3 | AREF | Analog reference voltage for ADC |
4-9 | A0-A5 | Analog input pins |
10-15 | D0-D5 | Digital I/O pins |
16 | SCK | SPI clock |
17 | MISO | SPI Master In Slave Out |
18 | MOSI | SPI Master Out Slave In |
19 | RX | UART receive pin |
20 | TX | UART transmit pin |
21 | SDA | I2C data line |
22 | SCL | I2C clock line |
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP280.h>
Adafruit_BMP280 bmp; // I2C Interface
void setup() {
Serial.begin(115200);
while (!Serial); // Wait for serial port to connect
if (!bmp.begin()) {
Serial.println(F("Could not find a valid BMP280 sensor, check wiring!"));
while (1);
}
}
void loop() {
Serial.print(F("Temperature = "));
Serial.print(bmp.readTemperature());
Serial.println(" *C");
Serial.print(F("Pressure = "));
Serial.print(bmp.readPressure());
Serial.println(" Pa");
Serial.print(F("Approx altitude = "));
Serial.print(bmp.readAltitude(1013.25)); // this should be adjusted to your local forcase
Serial.println(" m");
delay(2000);
}
Note: The above example demonstrates how to interface the BMP280 sensor on the Adafruit nRF52840 CLUE with an Arduino UNO. Ensure that you have installed the necessary libraries and that the I2C address matches that of your sensor.
For more detailed information, visit the Adafruit Learning System and the nRF52840 CLUE product page.