Microchip ATSAMD51P20A
| Wi-Fi Module | ESP32 |
Microchip ATSAMD51P20A
| Wi-Fi Module | ESP32 |
2.4-inch IPS LCD, 320x240 pixels
Rechargeable Li-ion battery (350mAh), USB-C port, and Micro-USB port
120 MHz
3-axis accelerometer, digital ambient light sensor, digital microphone
2x Grove connectors, 1x SD card slot, 1x USB-C port, 1x 3.5mm audio jack, 1x Micro-USB port
MicroPython, Arduino, C++
72.2mm x 53.3mm x 15.2mm
Conclusion
The Wio Terminal Development Board is a powerful and versatile platform for IoT development, offering a unique combination of processing power, Wi-Fi connectivity, and a range of peripherals. Its ease of use, flexibility, and affordability make it an ideal choice for professionals, hobbyists, and educational institutions alike.
Wio Terminal Development Board DocumentationOverviewThe Wio Terminal is a development board that integrates a microcontroller, LCD display, Wi-Fi, and Bluetooth capabilities in a compact and user-friendly package. It is compatible with the Arduino IDE and supports a wide range of IoT applications.Hardware SpecificationsMicrocontroller: ESP32-WROVER
LCD Display: 2.4" 320x240 TFT LCD
Wi-Fi: 802.11 b/g/n
Bluetooth: 4.2
GPIO: 26 x Digital IO, 2 x Analog IO
Power: USB-C, Li-Po battery supportCode Examples### Example 1: Wi-Fi Connectivity and Web ServerIn this example, we will demonstrate how to connect the Wio Terminal to a Wi-Fi network and host a simple web server using the ESP32-WROVER's built-in Wi-Fi capabilities.```cpp
#include <WiFi.h>const char ssid = "your_wifi_ssid";
const char password = "your_wifi_password";WiFiServer server(80); // Create a Wi-Fi server on port 80void setup() {
Serial.begin(115200);
WiFi.begin(ssid, password); // Connect to Wi-Fi network
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to Wi-Fi...");
}
Serial.println("Connected to Wi-Fi");
server.begin(); // Start the Wi-Fi server
}void loop() {
WiFiClient client = server.available(); // Listen for incoming clients
if (client) {
String request = client.readStringUntil('
');
if (request.indexOf("/ledon") != -1) {
digitalWrite(LED_BUILTIN, HIGH);
} else if (request.indexOf("/ledoff") != -1) {
digitalWrite(LED_BUILTIN, LOW);
}
client.stop();
}
delay(100);
}
```### Example 2: LCD Display and Sensor IntegrationIn this example, we will demonstrate how to use the Wio Terminal's built-in LCD display to show sensor readings from a DHT11 temperature and humidity sensor.```cpp
#include <Wio_Terminal_Library.h>
#include <DHT.h>#define DHTPIN 2 // DHT11 sensor pin
DHT dht(DHTPIN, DHT11);Wio_Terminal tft = Wio_Terminal(); // Initialize LCD displayvoid setup() {
tft.begin(); // Initialize LCD display
dht.begin(); // Initialize DHT11 sensor
}void loop() {
float temp = dht.readTemperature();
float humi = dht.readHumidity();
if (isnan(temp) || isnan(humi)) {
Serial.println("Failed to read from DHT sensor!");
return;
}
tft.fillScreen(BLACK); // Clear LCD display
tft.setCursor(0, 0);
tft.setTextFont(2);
tft.setTextColor(WHITE);
tft.println("Temperature: " + String(temp) + "C");
tft.println("Humidity: " + String(humi) + "%");
delay(1000);
}
```### Example 3: Bluetooth Low Energy (BLE) PeripheralIn this example, we will demonstrate how to use the Wio Terminal as a BLE peripheral device, advertising a custom service and characteristic.```cpp
#include <BLE.h>BLEService service("esp_gatt_serv"); // Create a BLE service
BLECharacteristic characteristic("esp_gatt_char", BLECharacteristic::PROPERTY_NOTIFY); // Create a BLE characteristicvoid setup() {
Serial.begin(115200);
BLE.begin(); // Initialize BLE
BLE.setLocalName("Wio Terminal"); // Set device name
service.addCharacteristic(characteristic); // Add characteristic to service
BLE.addService(service); // Add service to BLE device
BLE.advertise(); // Start advertising
}void loop() {
if (BLE.connected()) {
characteristic.setValue((byte)0x01); // Set characteristic value
BLE.writeCharacteristic(characteristic); // Write characteristic value
delay(1000);
}
}
```These examples demonstrate the Wio Terminal's capabilities in Wi-Fi connectivity, LCD display, sensor integration, and BLE peripheral mode. The board's versatility and ease of use make it an ideal choice for a wide range of IoT projects.