Thanks to awesome folk at Seeed Studio, I got my hands early on Wio Terminal. I’m absolutely on boards (pun!) with the idea. An all-in-one development board to ease you into programming, or take your existing idea to a new level thanks to a nice form factor, capable processing and pretty impressive I/O on a device with sub $30 price tag.
Why Wio Terminal is pretty cool
When it comes to prototyping, Arduino, Raspberry Pi and ESP development boards are probably the most popular choices, albeit not the only choices out there. As these platforms develop, they come with HATs, add-on boars and component that often require breadboard or soldering skills to make it work. Dealing with the electronic side of things can be daunting, especially when added on top of already complex programming challenges.
Every now and then, something surfaces, that tries to tackle the accessibility, by providing complete but also a flexible and expandable development platform that aims at people who want to get started. Wio Terminal is one of these well made and polished products that come with an array of modules to play packed in an incredibly appealing form factor.
Specs
What that sub $30 development platform brings to the table is a well-featured board that will keep you busy for weeks to come. At the heart of the system, Wio Terminal sports ATSAMD51 ARM processor capable of boosting its 120MHz core to 200MHz. On top of that it comes equipped with BLE 5.0 and 2.4Ghz / 5Ghz Wi-Fi thanks to it’s Realtek RTL8720DN chip.
All this is wrapped in a handsome looking case that comes with the following modules to play with:
- 2.4″ LCD display (320×240)
- 5-way joystick
- 3 custom buttons
- micro SD card support
- USB-C OTG
- 40 pin header with SPI, I2C, I2S, ADC, DAC, PWM, UART(Serial)
- 2 GROVE sockets
- Microphone & Speaker
- Light Sensor
- Infrared Emitter (IR 940nm)
- 3-axis accelerometer
There is plenty of modules built in to play with before you even consider 300+ GROVE modules in the library that can be added without the need for a soldering iron. All these modules can be programmed with the software of your choice:
- Arduino
- MicroPython
- ArduPy
- AT Firmware
- Visual Studio Code
- CircuitPython (coming soon)
About Seeed Studio
Seeed is the IoT hardware enabler providing services over 10 years that empower makers to realize their projects and products. Seeed offers a wide array of hardware platforms and sensor modules ready to be integrated with existing IoT platforms and one-stop PCB fabrication and PCB assembly service. Seeed Studio provides a wide selection of electronic parts including Arduino Raspberry Pi and many different development board platforms Especially the Grove System help engineers and makers to avoid jumper wires problems. Seeed Studio has developed more than 280 Grove modules covering a wide range of applications that can fulfil a variety of needs.
Software
Each development board is only as good as the support and the community behind it. Wio Terminal is new, but the platform already have good community base. On top of that, a well designed wiki page fore Wio Terminal will walk you through the basic of use of every aspect of the Wio Terminal so you could feel at home.
Before you start, follow this guide to update the firmware for the WiFi controller. Then enjoy the various examples of Wio Terminal in action. From the listed demos, the most fun for me were:
- Reading Raspberry Pi’s System Status using Wio Terminal
- Reading Coronavirus COVID-19 Live Data using Wio Terminal
- Wio Terminal Displaying Accelerator Readings
Which show case how creative you could get with Wio Terminal itself. The guides are very well written and simple to follow through. Bonus points for breaking down the code and explaining what each section of the code does. It’s a great help for anyone who’s new to programming.
Wio Terminal – YouTube stats
Displaying Covid19 stats is a pretty depressing project. I think I could add some life to the idea and reuse the code for the greater good – or at least pleasure and self-satisfaction. With a little bit of magic, Arduino libraries and initiative I will show you how easy it is to actually use the projects as templates.
The project uses YouTube API to pull basic stats from my YouTube account (subs, videos, views) and display it on Wio Terminal. It was very easy to adapt to existing Arduino libraries to make this work. Start by downloading the Covid-19 project file and we will hack this together.
Libraries
You will need to log in to Google Console and enable YouTube API. Once available generate an API key that will be used to download the YouTube channel data. In the Arduino IDE, download YouTubeApi via Library Manager or GitHub and ArduinoJson (GitHub).
If this is 1st time with Wio Terminal, follow the setup guide to add the board to Arduino IDE, select the board and get everything working.
WiFi & Credentials
Wio Terminal comes with its own WiFi library. We can’t just use the template for the ESP32 from the YouTube library sample. In this project is simpler to reuse (and modify) the existing WiFi code. I will remove redundant parts and replace them with the ones needed for the sketch to work.
I will also strip the code from the serial messages. Wio Terminal comes with a screen, I can use this instead.
pinMode(WIO_KEY_C, INPUT_PULLUP);
WiFi.begin(WIFI_SSID, WIFI_PASS);
tft.begin();
tft.setRotation(3);
tft.fillScreen(TFT_BLACK);
tft.setFreeFont(FMB12);
tft.setCursor((320 - tft.textWidth("Connecting to Wi-Fi.."))/2, 120);
tft.print("Connecting to Wi-Fi..");
tft.setTextColor(TFT_GREEN);
tft.setCursor((320 - tft.textWidth(WIFI_SSID))/2, 160);
tft.print(WIFI_SSID);
tft.setCursor((320 - tft.textWidth(WIFI_SSID))/2, 180);
// attempt to connect to Wifi network:
while (WiFi.status() != WL_CONNECTED) {
tft.setTextColor(TFT_RED);
tft.print(".");
if(z > tft.textWidth(WIFI_SSID)){
z = 0;
tft.fillScreen(TFT_BLACK);
tft.setFreeFont(FMB12);
tft.setCursor((320 - tft.textWidth("Connecting to Wi-Fi.."))/2, 120);
tft.print("Connecting to Wi-Fi..");
tft.setTextColor(TFT_GREEN);
tft.setCursor((320 - tft.textWidth(WIFI_SSID))/2, 160);
tft.print(WIFI_SSID);
tft.setCursor((320 - tft.textWidth(WIFI_SSID))/2, 180);
}
// wait 1 second for re-trying
delay(1000);
z++;
}
tft.fillScreen(TFT_BLACK);
tft.setTextColor(TFT_GREEN);
tft.setCursor((320 - tft.textWidth("Connected!"))/2, 120);
tft.print("Connected!");
getData();
I also moved the credentials to a new file. It’s easier to share and modify the project this way. It’s a good practice. If you want to apply this to your project just create the .h
file and use #include "xxx.h"
in your .ino
file.
define WIFI_SSID "ssid"
define WIFI_PASS "password"
define API_KEY "YouTube_API" // your google apps API Token
define CHANNEL_ID "UC7V__uBIaZotHn_smHJShGQ" // my channel ID
YouTube API & Stats
For the most part, I only need a core part of the code to obtain the JSON formatted data from YouTube and display relevant to my channel, numbers. Since the connection is already sorted by the covid-19 project, all I have to do is to import the YouTube stats into the script and store the numbers in relevant variables.
void()
...
api.getChannelStatistics(CHANNEL_ID);
...
getDAta()
...
api.getChannelStatistics(CHANNEL_ID);
long TotalSubs = api.channelStats.subscriberCount;
long TotalViews = api.channelStats.viewCount;
long TotalVideo = api.channelStats.videoCount;
LCD
Obviously, small changes had to be introduced to the display code. I retained the same layout, tweaking labels, colours and variables containing the subscription numbers. You can get even more creative and add images or custom shapes. I will keep mine neat and simple.
// -----------------LCD--------------------- tft.fillScreen(TFT_RED); tft.setFreeFont(FF17); tft.setTextColor(tft.color565(224,225,232)); tft.setCursor((320 - tft.textWidth("NotEnoughTech"))/2, 25); tft.print("NotEnoughTech"); tft.fillRoundRect(10, 45, 300, 55, 5, tft.color565(255, 194, 179)); tft.fillRoundRect(10, 105, 300, 55, 5, tft.color565(255, 194, 179)); tft.fillRoundRect(10, 165, 300, 55, 5, tft.color565(255, 194, 179)); tft.setFreeFont(FM9); tft.setTextColor(TFT_BLACK); tft.drawString("Subscribers", 75, 50); tft.drawString("Videos", 75, 110); tft.drawString("Total Views", 75, 170); tft.setFreeFont(FMB12); tft.setTextColor(TFT_BLACK); tft.drawNumber(TotalSubs, 110, 75); tft.setTextColor(tft.color565(224,225,232)); tft.drawNumber(TotalVideo, 110, 135); tft.setTextColor(TFT_BLUE); tft.drawNumber(TotalViews, 110, 195);
Final thoughts
Wio Terminal is a very polished development board. It offers an array of different modules to interact with through various programming languages. Unlike some other boards, it comes with an approachable wiki which breaks down the first ice and eases you into the programming aspect of it. If you want a beginner-friendly board that offers great interaction with other modules, or all-in gadget to take with you to practice programming on the go – Wio Terminal is a strong contender! What do you think? Let me know in this Reddit thread.
Project Download
Download project files here. Bear in mind that Patreon supporters have early access to project files and videos.