How to turn OpenMote B board GPIOs ON and OFF

Work with the openmote B board pins as GPIO and set the digital outputs for any industrial purpose!
February 22, 2022 by
How to turn OpenMote B board GPIOs ON and OFF
Boot & Work Corp. S.L., Fernandez Queralt Martinez

Introduction

Do you have an openmote B board and would you be interested in connecting actuators to the GPIOs? In this blog post, we will learn how to turn all openmote GPIOs on and off recursively, like a blink with all GPIOs.

Latest Posts

Your Dynamic Snippet will be displayed here... This message is displayed because you did not provided both a filter and a template to use.

Requirements

Openmote pins


The main openmote B board includes an expansion port (8 pins with 2.54 mm spacing) that can be used for debugging or to connect daughter board, i.e., the openmote B sensors board. The expansion board includes a Vcc (2.5V) and a GND pin, as well as six configurable pins.

GPIO driver, into the cc2538 internal microcontroller, is divided by N ports, and the name of the pins belong to those ports and numbers. So, pin called PA7 is for port A number 7.
You can see it in the openmote's user guide
Openmote pins - How to turn OpenMote B board GPIOs ON and OFF

Test the GPIOs


In order to test our openmote b board's GPIO, we will need to download the openmote B files.

1. First of all, go to section number 2. How to download openmote B board files >>>

2. Then, we are going to install docker-compose. Please, install it from here >>>

3. Then, inside the test folder, there is the folder called test-gpio, which will be the project that we are going to run.

4. From the openmote-fw/ folder, we will run the following command:

docker-compose run --rm openmote test-gpio

5. Finally, connect an actuator or just measure the voltage with the multimeter and see how the pins keep turning on and off.

Openmote test - How to turn OpenMote B board GPIOs ON and OFF

Also, you can check the code by opening the file: 

nano ~/openmote-fw/test/test-gpio/src/main.cpp

​Search in our Blog

How to turn OpenMote B board GPIOs ON and OFF
Boot & Work Corp. S.L., Fernandez Queralt Martinez February 22, 2022

Looking for your ideal Programmable Logic Controller?

Take a look at this product comparison with other industrial controllers Arduino-based. 

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.


Industrial PLC comparison >>>