Wio Terminal Overview

by Gilbert Tanner on Aug 18, 2020 · 5 min read

Wio Terminal Overview
The Wio Terminal is a SAMD51-based microcontroller with Wireless Connectivity supported by Realtek RTL8720DN that’s compatible with Arduino and MicroPython. It runs at 120MHz (Boost up to 200MHz), 4MB External Flash and 192KB RAM. It supports both Bluetooth and Wi-Fi providing backbone for IoT projects. The Wio Terminal itself is equipped with a 2.4” LCD Screen, onboard IMU(LIS3DHTR), Microphone, Buzzer, microSD card slot, Light sensor, and Infrared Emitter(IR 940nm). On top of that, it also has two multifunctional Grove ports for Grove Ecosystem and 40 Raspberry pi compatible pin GPIO for more add-ons. - Wio Terminal Documentation

In this article, you'll get an overview of the Wio Terminal and what it can be used for. You can get the Wio Terminal for about 30$ on seedstudio.com.

Disclosure: SeedStudio provided me the Wio Terminal and Wio Terminal Battery Chassis free of charge. Nevertheless, the opinions in this article are strictly my own and not influenced by SeedStudio.

Demo Applications

You can find lots of exciting demo applications in the documentation, including:

IR Thermal Imaging with Wio Terminal
Figure 1: IR Thermal Imaging with Wio Terminal (Source)
Retro Graming on Wio Terminal
Figure 2: Retro Graming on Wio Terminal (Source)

Hardware Overview

Hardware Overview
Figure 3: Hardware Overview (Source)
Main Chip Manufacturer Part Number ATSAMD51P19
Core Processor ARM® Cortex®-M4F
Maximum Speed 200MHz
External Flash 4MBytes
Operating Temperature -40°C ~ 85°C (TA)
LCD Screen Resolution 320x240
Display Size 2.4inch
Drive IC ILI9341
Wireless Connectivity Manufacturer Part Number RTL8720DN
KM4 CPU ARM® Cortex®-M4F @ 200MHz
KM0 CPU ARM® Cortex®-M0
Wi-Fi 802.11 a/b/g/n 1x1, 2.4GHz & 5GHz
Bluetooth Support BLE5.0
Built-in Modules Accelerometer LIS3DHTR
Microphone 1.0V-10V -42dB
Speaker ≥78dB @10cm 4000Hz
Light Sensor 400-1050nm
Infrared Emitter 940nm
Interface MicroSD Card Slot Maximum 16GB
GPIO 40-PIN (Raspberry Pi Compatible)
Grove 2 (Multifunction)
FPC 20-Pins
USB Type-C Power & USB-OTG
Operation Interface 5-Way Switch
Power/Reset Switch
User-defined button *3
Enclosure Dimension 72mm*57mm*12mm
Materials ABS+PC

Pinout

The Wio Terminals pinout is identical to the one on the Raspberry Pi. This allows you to use the Wio Terminal as a Raspberry Pi slave device and use Raspberry Pi Hats on the Wio Terminal.

Wio Terminal Pinout
Figure 4: Wio Terminal Pinout (Source)

Getting started

The Wio Terminal can be programmed with Arduino Code, MicroPython, ArduPy, and CircuitPython. In this article, I'll go over how to program the Wio Terminal with the Arduino IDE and C code. If you are interested in programming the Wio Terminal through other tools, check out the documentation.

1. Installing the Arduino IDE

Download the Arduino IDE from the Software section on their website.

Arduino IDE
Figure 5: Arduino IDE

2. Adding the Wio Terminal Board Library

Next, you need to add the Wio Terminal Board Library to Arduino. For this click on File > Preferences and copy the below URL to Additional Boards Manager URLs:

Adding Board Library
Figure 6: Adding Board Library
Note: If you have multiple URLs, separate them with colons.

After adding the URL, go to Tools > Board > Board Manager and Search Wio Terminal.

Add Board
Figure 7: Add Board

After installing, you should be able to select Wio Terminal under Tools > Board.

Select Wio Terminal
Figure 8: Select Wio Terminal

With the board selected, you can now open some example code and upload it to the Wio Terminal. To keep it simple open the blink example (File > Examples > 01.Basics > Blink) and press the upload button.

A few seconds after the upload finished, you should see the blue LED at the bottom of the Wio Terminal start to blink. If it doesn't make sure you followed the steps correctly and selected the correct port. If you're still unable to get it to work, check out the 'Get Started with Wio Terminal' guide for more details.

The documentation also includes guides for using the different sensors on the WIO Terminal. In the below sections, I quickly go over how to use the LCD, IMU (Inertial measurement unit), and Microphone. For more details, take a look at the documentation.

LCD

The library needed for the LCD is included inside the Wio Terminal Board Libary, and hence there is no need to install it. To use it simple include TFT_eSPI.h and create a TFT_eSPI object.

#include"TFT_eSPI.h"
TFT_eSPI tft;
 
void setup() {
    tft.begin();
    tft.setRotation(3);
 
    tft.fillScreen(TFT_RED); // fills entire the screen with colour red
}
 
void loop() {
 
}

IMU (LIS3DHTR)

The Wio Terminal comes with a LIS3DHTR, 3-axis MEMS accelerometer from STMicroelectronics. Unlike the LCD, the IMU library isn't preinstalled. To install it, download the Seeed_Arduino_LIS3DHTR repository and include it by clicking Sketch > Include Library > Add .ZIP Library, and selecting the Seeed_Arduino_LIS3DHTR.zip file you just downloaded.

Now you can use the following code to read accelerometer values continuously.

#include"LIS3DHTR.h"
LIS3DHTR<TwoWire> lis;
 
void setup() {
  Serial.begin(115200);
  lis.begin(Wire1);
 
  if (!lis) {
    Serial.println("ERROR");
    while(1);
  }
  lis.setOutputDataRate(LIS3DHTR_DATARATE_25HZ); //Data output rate
  lis.setFullScaleRange(LIS3DHTR_RANGE_2G); //Scale range set to 2g
}
 
void loop() {
  float x_values, y_values, z_values;
  x_values = lis.getAccelerationX();
  y_values = lis.getAccelerationY();
  z_values = lis.getAccelerationZ();
 
  Serial.print("X: "); Serial.print(x_values);
  Serial.print(" Y: "); Serial.print(y_values);
  Serial.print(" Z: "); Serial.print(z_values);
  Serial.println();
  delay(50);
}
Read accelerometer
Figure 10: Read accelerometer (Source)

Microphone

There isn't a microphone library for the Wio Terminal just yet, but the microphone can nonetheless be used by using analogRead continuously.

void setup() {
  pinMode(WIO_MIC, INPUT);
  Serial.begin(115200);
}
 
void loop() {
  int val = analogRead(WIO_MIC);
  Serial.println(val);
  delay(200);
}

Output:

456
455
456
455
453
457
450
455
...

Conclusion

The Wio Terminal is an open-source, SAMD51-based microcontroller with lots of interesting features including an LCD Screen, onboard IMU, and microphone for just 30$. It also has excellent documentation, which makes it a joy to get started.

That's all from this article if you have any questions or just want to chat with me, feel free to leave a comment below or contact me on social media. If you want to get continuous updates about my blog make sure to join my newsletter.

Free Machine Learning Newsletter

Table of Content