In this project I am going to explain how a digital Pipelinecheckerboard was created with LEDs(green, blue, red). The device uses a ESP32 WiFi chip to connect to the Internet to get actual statuses and ids of different pipelines in a specific Githlab project, plus statuses such as on/off for the LEDs. The device is powered by a USB Data Sync Cable for Arduino UNO. Under the hood it uses an Arduino Uno R3 compatible board, which are readily available, economical, and communicate well with the ESP32 chips.
- 1 x Arduino UNO R3 (€16.50 from Amazon)
- 1 x ESP32 WIFI chip (€9.49 from Amazon)
- 1 x Collection of 0 Ohm-1M Ohm resistors (€8.27 from Amazon)
- 1 x pack of jumping wires (€15.25 from Amazon)
- 40 pcs 20cm Male to Female Jumper Wire (€4.91 from Amazon)
- 1 x Arduino Solderless Breadboard (€6.53 from Amazon)
- 1 x LEDs pack (€12.37 from Amazon)
Our pipelinecheckerboard needs to connect to the Internet to get data to display on our LED components. The Arduino Uno compatible boards do not contain on-board WiFi, and so we have to use a further component to connect our project to the Internet.
The ESP32 WiFi and Bluetooth chip is the latest generation of Espressif products. It has a dual-core 32-bit MCU, which integrates WiFi HT40 and Bluetooth/BLE 4.2 technology inside.
Compared to the arduino ESP8266 (the previous generation), the ESP32 wifi and bluetooth chip (also known as ESP wroom 32) has a significant performance improvement. It is equipped with a high-performance dual-core Tensilica LX6 MCU. One core handles high speed connection and the other for standalone application development. The dual-core MCU has a 240 MHz frequency and a computing power of 600 DMIPS.
In addition, it supports Wi-Fi HT40, Classic Bluetooth/BLE 4.2, and more GPIO resources. ESP32 chip (ESP wroom 32) integrates a wealth of hardware peripherals, including capacitive touch sensors, Hall sensors, low noise sensor amplifiers, SD card interfaces, Ethernet interfaces, high-speed SDIO / SPI, UART, I2S and I2C, etc.
Engineered for mobile devices, wearable electronics and Internet of Things (IoT) applications, the ESP32 wroom 32 achieves ultra-low power consumption with a combination of several proprietary software applications. The state-of-the-art power saving features include fine resolution clock gating, power modes, and dynamic power scaling.
DFRobot introduces the ESP-ROOM-32 module, based on the Espressif. ESP32 chip. It has integrated electronic peripherals, external expansion of all GPIO pins, an onboard antenna, stamp hole design and easy mass production. It can be used for product development, integrated design and many more applications.
The project hardware uses six LEDs to get a level of illumination at least sort of visible from across the room. Here each pin of a esp32 WROOM can only output a small amount of current which is enough to power a single LED at anywhere near maximum brightness.
It powers multiple LEDs directly from an Arduino’s xV supply pins, which can provide a much higher current than a common 5V output. The program resets and runs easily, switching the LEDs on and off using a capacitor, whose base is wired to the reset pin and the ground pins of the esp32 WROOM. This way, the board runs and resets automatically rather than always resseting mannually.
with help of the USB connector’s power, I am able to supply the board with enough current and upload the program code on to it. It isn’t exactly pretty, but it works just fine. The resistors I used are 200 Ohm between the digital pins and ground bases.
The code written for this project can be found here: Project loTpipeLineChecker
-
Arduino core for ESP32 WiFi chip to run the whole thing on any ESP32-based board. To install this, you need to add the library URL to your Arduino Board Manager:
https://dl.espressif.com/dl/package_esp32_index.json
. -
ArduinoJson to deserialize GitLab API responses and extract the pipeline id and status. This can be installed and included directly via the Arduino Library Manager.
Fill out the settings at the top, and flash it on a compatible board. Connect via Serial Monitor to check that it works - it’ll connect to WiFi and start polling the pipeline status, outputting some debug info along the way.
Alongside the obvious SUCCESS (green), RUNNING (blue) and FAILED (red) statuses there’s also UNKNOWN (blinking blue, when the status is different from anything the code checks against).
-
All parametres wich are to be use all through the project such as URLs, LEDs pins setup and many others should be stored in a configuration file and imported in to the main file as a libary.
-
Also all sensitive informations not to be shared with the general public like for example passwords should be stored in a secret file an imported in to the main file as a libary as well. Here we can find an example of such a file: secrets.h.example.
- Martin Fokam Simo - Initial work - loTpipeLineChecker
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details.