B4R Tutorials

Node-Red MQTT controlling 8+8 digital Inp-Out and I2C ADC on ESP32

Here a sample program to control/monitor 8+8 digital Out-Inp, plus an I2C ADC.
The program use the MQTT protocol.
This program is an evolution of the previous one I posted.

This version add...


  • NodeRed_Analog_Digital_Ex.rar
    68.3 KB · Views: 119

Node-Red MQTT controlling 8 relays ESP32

Here a sample program to control 8 outputs on arduino ESP32. The program use the MQTT protocol to exchange the data (really a single byte). By Node-red web interface the user set or reset the...


  • 8_relay_ESP.Nodered_example.zip
    154.2 KB · Views: 152

SD cards

The rSD library allows reading and writing to SD cards. The Ethernet shield as well as other shields include a SD slot.

The steps required to work with files:
1. Initialize a SD object. You need...


  • B4J_PrepareCurrencyFile.zip
    2.8 KB · Views: 718
  • SD_Example.zip
    1.1 KB · Views: 916

[Tool]LCD Display Designer

Tool to design LCD Display Layouts for 20x4 or 16x2 displays connected to Arduino, Raspberry Pi or other.


Screenshot application with generated B4R code and an Arduino UNO with...


  • rLiquidCrystal_I2C-110.zip
    23.3 KB · Views: 280
  • lcddisplaydesigner.zip
    6.6 KB · Views: 280
Last edited:

Arduino Simulator

Hey everybody,

Just found this and looks very impressive...


Glossary for Arduino Development

This is not a tutorial for B4R. I think a glossary of terms might be useful for beginners to electronics and B4R. So I created my own list in GitHub to record the terms that I find need...

MQTT controlling 8 relays, WeMos D1 mini WiFi, Android 4G

Here is a short tutorial on how to control an 8 channel relay module via MQTT. Below you will find both the WeMos and Android source codes needed to get started. The relay module is connected to a...
Last edited:

ESP32: Simple OTA/Update via WebServer

This example (adapted from the Arduino examples under Arduino->File->Examples)

- downloads a file from a server (exactly: the update file)
- store this file to the filesystem (SPIFFS)
- starts an...

ESP Configurator based on B4RSerializator


This tool replaces the browser based solution...


  • B4R_ESPConfigurator.zip
    2 KB · Views: 2,171
  • B4J_ESPConfigurator.zip
    46.1 KB · Views: 1,918

ESP8266 - Getting Started

B4R v1.20 added support for ESP8266 modules. ESP8266 is a great module for IoT solutions. For a few dollars you get a powerful microcontroller with built-in support for wifi.

I recommend to...


  • B4J_ConnectToESP8266.zip
    3.7 KB · Views: 2,190
Last edited:

ESP32: OTP/2FA example

This example generates a OTP/2FA ("One Time Password") as you know it when you login to a website and you get a 6 digit code via sms. It changes every 30 seconds.

How it works:

- as it is time...

E-Paper (probably suitable for battery powered projects)

Here is a nice tutorial by the guy in DronebotWorkshop. What surprised me (and I did not know that) is that with e-paper you only have power consumption while writing to it and no more. Even if...
Last edited:

Updated RSA Encryption between B4x and ESP32's (any other plattform will do, too)

Here's an updated example how to

- generate an RSA keypair (Public and Private key) on a ESP32 and on B4x
- export these keys in PEM format (compatible with any other plattform like B4x, .net...


  • ExchangeKeysB4J.zip
    5 KB · Views: 216
  • ExchangeKeysB4R.zip
    4.4 KB · Views: 216

DroneBot Workshop - A great dissection of the new Arduino IDE


PS4 F1 2020 Interfacing using ESP8266


Hi Guys,

My wife's eldest son is addicted to PS4 F1 2020 game, even bought himself a Rig for a Steering Wheel and Pedals.
He works alongside with me and on one of...
Last edited:

Full responsive ESP8266 settings WebApp with websockets

Merry Christmass everyone in the Christian community of this forum,

Yesterday I 've had a great crazy idea which turned out to be a working one too.

Normally one would answer to the question if...


  • B4RWebApp.zip
    5 KB · Views: 270
  • B4RWebServer.zip
    2.8 KB · Views: 278
Last edited:

ESP32 Camera Picture Capture and Video Streaming! (Updated with code!)


Last December I made a request for support for the ESP32 Camera support. Well, I finally found the time to work on it myself and here's my initial attempt at implementing this with...
Last edited:

SSD1306 Module

I've been working with SSD1306 OLED for long time, in some projects I was in need to add some special fonts and add some graphics or icons like blue tooth symbols. I thought to put all these...


  • SSD_module.zip
    24.5 KB · Views: 336
Last edited:

Cables AWG - Surface (mm^2) - Diameter(mm)

Good morning everyone,

I have put together this Excel file which shows the "translations" bettween AWG value of cable (american wire gauge) and european metric value of surface and diameter. I...


  • Cables-AWG-Surface-Diameter.xlsx
    12.1 KB · Views: 288

Weather Station using MQTT, UDP and Thingspeak

This is my humble effort to produce a weather station (based on this project). You will need:

1 x Wemos D1 Mini
1 x BME280 Sensor
1 x TP4056 Li-Ion Charging board
1 x 3.7V Li-Ion Battery
Last edited: