#WioTerminal – 1st steps 👣, developer steps !

Hi !

I’ll keep this as a reference post for 1st steps developing apps for WioTerminal. And I’ll share the necessary steps for a Hello World app using a countdown and my office!

wio terminal displaying a countdown and my office

Developer Environment: Arduino IDE

This one is easy, we can use the Arduino IDE.

Bonus lesson learned here. It’s important to uninstall previous versions, before install a new one.

unistall previous arduino versions

Arduino Libraries for Wio Terminal

Once installed we need to add some references / libraries / packages to work with our Wio. Open Preferences from [File // Preferences] menu add let’s add the following URL to the Additional Boards Manager option.

https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
add additional board to support Wio Terminal

Now let’s open the Board Manager from the menu [Tools / Board / Board Manager]

open board manager

Let’s filter by Wio Terminal, and install the Seed SAMD board.

wio terminal board for arduino ide

Now we can choose the Wio Terminal board to work with.

wio terminal installed on arduino ide

Finally, let’s select the COM port to work with the device. I know, I may also write here:

Connect your device using the USB-C cable and turn it on.

select COM port in Arduino IDE

We are ready for a Hello World !

Installing additional libraries for Wio Terminal

This is more an Arduino IDE topic, however, I’ll drop some notes here. Let’s follow the steps in the [Installing the File System Library] tutorial.

Important: You can clone the File System repository for Arduino from SeeedStudio.

https://github.com/Seeed-Studio/Seeed_Arduino_FS.git
clone seeedstudio arduino fs repository

However, the idea is to download the a ZIP file to be imported to Arduino.

The Zip File has a set of files, and they are going to be used in Arduino to display the library samples and also to compile and build the code.

arduino fs zip file content

Import the library from the menu [Sketch // Include Library // Add .ZIP Library]

upload zip library to arduino IDE

Once the libraries are uploaded, the IDE will show the less important SUCESS message ever.

To complete the hello world I installed these additional libraries

And I installed the [Adafruit Zero DMA] library from the menu [Sketch // Include Library // Manager Library]

Adafruit Zero DMA libraries installed

Hello World display an image

Next step will be to create a new Arduino project. In order to display an image, we need to download the RawImage.h file and save it in the same location of the ino file. Just in case, I’ll upload the complete source code here:

https://github.com/elbruno/Blog/tree/main/20211015%20WioTerminal%20show%20image/displayimage01

And the final Hello World app is a countdown to … my office !

The source code is simple !

// Bruno Capuano 2021
// http://elbruno.com
#include"TFT_eSPI.h"
#include"Free_Fonts.h" //include the header file
#include "Seeed_FS.h" //Including SD card library
#include"RawImage.h" //Including image processing library
TFT_eSPI tft;
int counter = 5;
void setup() {
//Initialise SD card
if (!SD.begin(SDCARD_SS_PIN, SDCARD_SPI)) {
while (1);
}
tft.begin();
tft.setRotation(3);
tft.fillScreen(TFT_BLACK); //Black background
tft.setFreeFont(FS12);
}
void loop() {
if(counter == 0)
{
drawImage<uint8_t>("bruno.bmp", 0, 0);
tft.drawString("@elbruno",10,200);
}
else if(counter > 0)
{
counter–;
tft.drawString("Bruno show in …",75,100);
tft.drawString(String(counter),75,125);
tft.drawString("seconds",100,125);
}
delay(1000);
}

Happy coding!

Greetings

El Bruno

More posts in my blog ElBruno.com.

More info in https://beacons.ai/elbruno


References


¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

Advertisement

1 comment

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: