Component Documentation: STMicroelectronics NUCLEO-WL55JC1
The STMicroelectronics NUCLEO-WL55JC1 is a development board featuring the WL55JC microcontroller, a dual-core Arm Cortex-M4 and Cortex-M0+ processor. This board is part of the STM32 Nucleo family and provides a comprehensive set of peripherals, making it an ideal choice for IoT, wireless, and battery-powered applications.
Dual-core Arm Cortex-M4 and Cortex-M0+ processor
1 MB Flash memory and 256 KB SRAM
Wi-Fi and Bluetooth 5.0 connectivity
On-board sensors: accelerometer, gyroscope, and magnetometer
Arduino Uno V3 and ST Zio expansion connectors
USB Type-C port for power, programming, and debugging
Power supply options: USB, battery, or external power source
### Example 1: Wi-Fi Connection and Simple Web Server
This example demonstrates how to connect to a Wi-Fi network and create a simple web server using the NUCLEO-WL55JC1 board.
```c
#include <WiFi.h>
#include <WiFiClient.h>
const char ssid = "your_wifi_ssid"; // Replace with your Wi-Fi SSID
const char password = "your_wifi_password"; // Replace with your Wi-Fi password
WiFiServer server(80); // Create a server on port 80
void setup() {
Serial.begin(115200);
// Connect to Wi-Fi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
Serial.println("Connected to WiFi");
Serial.println("Starting web server");
void loop() {
WiFiClient client = server.available();
if (client) {
Serial.println("New client connected");
client.println("HTTP/1.1 200 OK");
client.println("Content-type:text/html");
client.println();
client.println("<html><body><h1>Hello from NUCLEO-WL55JC1!</h1></body></html>");
client.stop();
}
}
```
### Example 2: Accelerometer Data Read and Serial Output
This example demonstrates how to read data from the on-board accelerometer (LSM6DSO) and print it to the serial console.
```c
#include <Wire.h>
#include <LSM6DSO.h>
void setup() {
Serial.begin(115200);
Wire.begin();
if (!accelerometer.begin()) {
Serial.println("Failed to initialize accelerometer");
while (1);
}
}
void loop() {
int16_t x, y, z;
accelerometer.readAcceleration(x, y, z);
Serial.print("Accelerometer data: ");
Serial.print("X: ");
Serial.print(x);
Serial.print(" Y: ");
Serial.print(y);
Serial.print(" Z: ");
Serial.println(z);
### Example 3: Bluetooth Low Energy (BLE) Peripheral Mode
This example demonstrates how to use the NUCLEO-WL55JC1 board as a BLE peripheral, advertising a simple service and characteristic.
BLEService service("YOUR_SERVICE_UUID"); // Replace with your service UUID
BLECharacteristic characteristic("YOUR_CHARACTERISTIC_UUID", BLECharacteristic::PROPERTY_NOTIFY); // Replace with your characteristic UUID
void setup() {
Serial.begin(115200);
// Initialize BLE
BLE.begin();
// Set advertisement data
BLE.setDeviceName("NUCLEO-WL55JC1");
BLE.setLocalName("NUCLEO-WL55JC1");
BLE.setAdvertisementData("Nuclo-WL55JC1");
// Add service and characteristic
BLE.addService(service);
service.addCharacteristic(characteristic);
// Start advertising
BLE.advertise();
}
void loop() {
// Nothing to do here, BLE is handled in the background
delay(50);
}
```
These examples demonstrate the versatility of the NUCLEO-WL55JC1 board and its potential applications in IoT, wireless, and battery-powered projects.