B4R Tutorials

ESP32 WITH LCD (16*2) WITH 4 LINE INTERFACE (WITHOUT I2C)

ESP32 WITH LCD (16X2) 4 LINES INTERFACE:
Sub Process_Globals
    Public Serial1 As Serial
    Private wifi As ESP8266WiFi
    Public mylcd As LiquidCrystal
End Sub

Private Sub AppStart
    Serial1.Initialize(115200)...
 

Attachments

  • WhatsApp Image 2023-05-10 at 09.28.39.jpeg
    WhatsApp Image 2023-05-10 at 09.28.39.jpeg
    125.7 KB · Views: 219
  • WhatsApp Image 2023-05-10 at 09.31.55.jpeg
    WhatsApp Image 2023-05-10 at 09.31.55.jpeg
    176.2 KB · Views: 190

Updated B4R-AES256 example (compatible with B4x, php and all other platforms)

This is an updated example how to en-/decrypt data with AES256.

Libs needed: jRandomAccessFile only

Notes:

- As far as I know, the ESP32 doesn't support padding like PKCS5/7, so I had to do it...
 

Attachments

  • ESP32AES256.zip
    2.3 KB · Views: 424

MCUs comparison 2023

One popular MCU programmer made an YouTube stream with online testing and comparing the MCUs.
1. pin out high
2. make a test operation: a + b, a - b, a * b, a / b, sin(a), power(a, b), power(b...
 
Last edited:

Large strings joinstring & astream

I need to create a large string for http call. Using joinStrings if string variable is more than ~ 100 characters it crashes. I saw that an alternative is to use astream but how am i going to...
 
Last edited:

Tips to use an M5Stamp-C3U

It's a very small and quite powerful ESP32-board with WIFI/BLE and B4R support!

Use following board library in the Arduino-IDE in 'Settings'...
 

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...
 

Attachments

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

Arduino MicroPython is coming

 

Reading & Writing Time of DS1307 With ESP32 Using rWire

Reading Time of DS1307 With ESP32:
#Region Project Attributes
    #AutoFlushLogs: True
    #CheckArrayBounds: True
    #StackBufferSize: 600
#End Region
'Ctrl+Click to open the C code folder...
 

Attachments

  • ds1307.JPG
    ds1307.JPG
    23.7 KB · Views: 169
Last edited:

2 basic projects on esp : one with MQTT client and one with MQTT broker

it is just 2 basic projects to do some tests with MQTT
we have no personal data in projects, full provisioning is done by a Web server interface

one basic project is with Wifi and MQTT client...
 

Attachments

  • ESP_ConfigWifiMQTT_V1.4.zip
    5.6 KB · Views: 191
  • test_rsMQTTBroker.zip
    4.7 KB · Views: 202

Arduino RP2040 is in the block

 

u-blox ThingStream - Nina W106 - blog

TFT displays: TFT_ESPI (inline C) example

Update:

1. Init Display as a separate sub
2. TFT_ESPI as "global"
3. Drawtext as a sub with parms
4. Updated example


Although there is a library and I appreciate the good work, I like to...
 

Attachments

  • TFT_B4R.zip
    1.4 KB · Views: 86
Last edited:

Controllino Mega PLC Examples

Attached is a B4R project (using inline C) to manipulate the ports of the Controllino Mega. In this project we do the following:
1. Toggle the OVL (over voltage) LED of the PLC between on/off...
 

Attachments

  • ControllinoPorts.zip
    1.2 KB · Views: 42

How to write a Tutorial/Snippets/ShareYourCreations

Hi guys,

I know I am not the most prolific B4R user, but I'm proud to have been the first to post on the "Share Your Creations" of this sub-Forum.
The mentioned sub-Forums have become more and...
 
Last edited:

compilation language: arduino-cli config

Last edited:

Writing & Reading Serial EEPROM 24C512 With Arduino Uno Using rWire

SERIAL EEPROM 24C512 Reading & Writing:
Sub Process_Globals
    Public Serial1 As Serial
    Private Wire As WireMaster
    Dim bc As ByteConverter
End Sub

Private Sub AppStart
    Serial1.Initialize(115200)
    Log("AppStart")...
 

ChatGPT can help designing circuits

There is also an other quite useful capability of ChatGPT. It can help designing circuits by proposing components. The component it proposes is real and I have searched for it in...
 

Provisioning: Start Access point, display it's Wifi credentials as a Wifi-QRCode (can be scanned by any phone)

As the title says, a standard WiFi-QRCode ist displayed on a tft screen. This can be scanned by any modern phone to automatically and it connects to the ESP, so you don't need to type any...
 

Attachments

  • QRConnect.zip
    3.6 KB · Views: 65

P-MOSFETs

Today I was impressed. While being at the university, some 20 years ago I 've had a hard time understanding the principles of Transistors and MOSFETs. That was partly because I was starting...
 
Last edited:

Arduino-PIDController-Library

An inline C wrap for this Github project. Should be able to use it for PID control. It works very well.

Study the code - change your pins to what you need. For the attached project:
A0 =...
 

Attachments

  • B4RControllinoPIDtoModify.zip
    5.4 KB · Views: 26
Top