Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:14 05 Dec 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : LCD Visual Design Studio Free browser-based UI builder & C++ generator

     Page 3 of 3    
Author Message
Batteryman
Regular Member

Joined: 05/04/2016
Location: United Kingdom
Posts: 57
Posted: 04:43pm 01 Dec 2026
Copy link to clipboard 
Print this post

Hi all,

I have added Bluetooth support to the ESP32 Visual Studio web designer.

This allows an ESP32 or ESP32-S3 (including the Cheap Yellow Display and CrowPanel boards) to exchange serial data with a smartphone, tablet, or PC without needing an existing Wi-Fi network.

Key details:

   BLE UART (Default): Uses the standard Nordic UART Service (UUID 6E400001-...). This connects out-of-the-box on both Android and iOS without needing PIN pairing or custom phone apps. You can use standard terminal apps such as:
       Android: Serial Bluetooth Terminal (Kai Morich)
       iOS: Adafruit Bluefruit LE Connect or nRF Connect
   Classic Bluetooth Serial (SPP): Optional mode available for standard ESP32 boards where a traditional RFCOMM COM-port serial link is preferred.
   Events & Methods: Works through standard event handlers:
       Bluetooth1_Connected()
       Bluetooth1_Disconnected()
       Bluetooth1_Receive() — incoming text is read via Bluetooth1.Data
       Bluetooth1.Send(text) and Bluetooth1.SendLine(text)
       Bluetooth1.IsConnected (Boolean)
   Simulator support: You can test your code directly in the browser Run Preview before exporting or flashing. Opening the Bluetooth drawer under the virtual screen lets you connect a simulated phone, type incoming text, and view responses from the board.

Example code to try:

You can test this right now in the web editor without placing any controls by hand. Paste the code below into a blank VB Code tab. The .Create() statements in Form_Load will automatically instantiate the Bluetooth control, screen labels, indicator shape, and send button.


' ESP32 Visual Studio - Bluetooth / BLE Demo
' Connect using 'Serial Bluetooth Terminal' (Android) or 'Bluefruit LE' (iOS)

Private Sub Form_Load()
 ' Auto-create screen controls
 Label1.Create 15, 12, 290, 24
 Label1.Text = "Bluetooth: Waiting..."
 Label1.Font = 2

 Shape1.Create 15, 45, 290, 30
 Shape1.Text = "LED: OFF"
 Shape1.BackColor = RGB(40, 40, 40)
 Shape1.ForeColor = RGB(160, 160, 160)

 Label2.Create 15, 88, 290, 45
 Label2.Text = "Rx: (none)"
 Label2.Font = 1

 Button1.Create 15, 145, 135, 40
 Button1.Text = "Send Status"
 Button1.Font = 1

 Button2.Create 165, 145, 140, 40
 Button2.Text = "Toggle LED"
 Button2.Font = 1

 Label3.Create 15, 198, 290, 30
 Label3.Text = "Type 'on', 'off' or 'ping' in phone app"
 Label3.Font = 1

 ' Auto-create Bluetooth control (advertises as ESP32-Studio)
 Bluetooth1.Create 0, 0, 0, 0
End Sub

Private Sub Bluetooth1_Connected()
 Label1.Text = "Bluetooth: Connected"
 Label1.ForeColor = RGB(0, 200, 0)
 Bluetooth1.SendLine "Hello from ESP32 Studio!"
 Bluetooth1.SendLine "Commands: 'on', 'off', 'ping'"
End Sub

Private Sub Bluetooth1_Disconnected()
 Label1.Text = "Bluetooth: Disconnected"
 Label1.ForeColor = RGB(200, 50, 50)
End Sub

Private Sub Bluetooth1_Receive()
 Dim msg As String
 msg = Bluetooth1.Data

 ' Show received text on the display
 Label2.Text = "Rx: " & msg

 ' Parse basic commands sent from the phone terminal
 If msg = "on" Then
   Shape1.Text = "LED: ON"
   Shape1.BackColor = RGB(220, 180, 0)
   Bluetooth1.SendLine "ACK: LED is now ON"
 ElseIf msg = "off" Then
   Shape1.Text = "LED: OFF"
   Shape1.BackColor = RGB(40, 40, 40)
   Bluetooth1.SendLine "ACK: LED is now OFF"
 ElseIf msg = "ping" Then
   Bluetooth1.SendLine "pong"
 Else
   Bluetooth1.SendLine "Echo: " & msg
 End If
End Sub

Private Sub Button1_Click()
 If Bluetooth1.IsConnected Then
   Bluetooth1.SendLine "Status: " & Shape1.Text
 Else
   Label2.Text = "Rx: Not connected"
 End If
End Sub

Private Sub Button2_Click()
 ' Toggle the visual indicator from the touchscreen
 If Shape1.Text = "LED: ON" Then
   Shape1.Text = "LED: OFF"
   Shape1.BackColor = RGB(40, 40, 40)
 Else
   Shape1.Text = "LED: ON"
   Shape1.BackColor = RGB(220, 180, 0)
 End If

 If Bluetooth1.IsConnected Then
   Bluetooth1.SendLine "Touch update: " & Shape1.Text
 End If
End Sub




How to test it:

   In the browser:
Click Run, expand the bluetooth: advertising drawer at the bottom of the virtual screen, and click Connect phone. Type on, off, or any text into the box to test the two-way link.
   On hardware:
Click Export ZIP, extract, open the .ino in Arduino IDE, and upload to your ESP32 or ESP32-S3. Open your mobile BLE terminal, scan for ESP32-Studio, and connect.

Feedback and bug reports welcome.  

Peter

ESP32 LCD Design Studio - link
 
Batteryman
Regular Member

Joined: 05/04/2016
Location: United Kingdom
Posts: 57
Posted: 12:14am 02 Dec 2026
Copy link to clipboard 
Print this post

Hi,

I've added ESP32-C3 and ESP32-C6 to the board list. When you pick either one, its usual wiring fills in on its own.

ESP32-C3 (DevKitM-1 / SuperMini)

   Screen: MOSI 6, MISO 5, SCK 4, CS 7, DC 10, RST 3, touch CS 1.
   Sensors (I2C): SDA 8, SCL 9.
   SD card: CS 20.
   Arduino IDE: ESP32C3 Dev Module, with USB CDC On Boot set to Enabled.

ESP32-C6 (DevKitC-1)

   Screen: MOSI 19, MISO 20, SCK 21, CS 18, DC 2, RST 3, backlight 11, touch CS 10.
   Sensors (I2C): SDA 23, SCL 22.
   SD card: CS 1.
   Arduino IDE: ESP32C6 Dev Module.

What applies to both:

   Wi-Fi, WebServer and Bluetooth are allowed, but only in BLE UART mode. Picking Classic Serial shows an error, as it does on the CrowPanel 7".
   Pin checks: pins used by the chip's memory or its USB port show an error. Boot pins show a warning.

   SPI warning:  the warning about not using the main SPI pins now names each board's own pins. Before, it always said 23/19/18.

   ESP32-C6 with TFT_eSPI: you'll see a warning, because that library doesn't officially support the C6 yet. Use Adafruit GFX or Arduino_GFX if it won't compile.

The SD card pins are my own picks, because these boards don't have standard ones. Please check them against the pin chart of the boards you have. ESP32-C5 and ESP32-P4 are still on the roadmap.

Peter
ESP32 LCD Design Studio - link
 
Batteryman
Regular Member

Joined: 05/04/2016
Location: United Kingdom
Posts: 57
Posted: 11:05am 02 Dec 2026
Copy link to clipboard 
Print this post

Hi all,

Just managed to get HTTP Web Client / Data Fetcher (WebClient control) working!

   How it works:

If the real goal is pulling data from the web (weather forecasts, stock tickers, news headlines, or REST JSON endpoints from other devices) to show on your LCD screen controls:
   What it looks like in VB:


Sub Form_Load()
   ' Trigger the fetch when the form starts
   WebClient1.Get "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.1¤t=temperature_2m"
End Sub

Sub WebClient1_Response()
   If WebClient1.StatusCode = 200 Then
       ' You can display the raw text:
       ' Label1.Text = WebClient1.Body
       
       ' Or extract the specific temperature value from the Open-Meteo JSON:
       Label1.Text = "London: " & JSONValue(WebClient1.Body, "current.temperature_2m") & " °C"
   Else
       Label1.Text = "HTTP Error " & WebClient1.StatusCode
   End If
End Sub

Sub WebClient1_Error()
   Label1.Text = "Fetch failed: " & WebClient1.ErrorText
End Sub




Another example to try on real hardware:



' Mock weather response works immediately in Run Preview.
' On hardware: set WiFi SSID/password, and change the URL below.
Private Sub Form_Load()
 Label1.Create 10, 10, 300, 25
 Label1.Text = "Weather from WebClient"
 Label1.Font = 2
 Label2.Create 10, 45, 300, 25
 Label2.Text = "Waiting for Wi-Fi..."
 Gauge1.Create 10, 85, 100, 100
 Gauge1.Font = 1
 Label3.Create 125, 90, 180, 25
 Label3.Text = "Humidity: --"
 ProgressBar1.Create 125, 125, 180, 20
 Button1.Create 125, 165, 180, 40
 Button1.Text = "Fetch weather"
 Button1.Font = 1
End Sub

Private Sub WiFi1_Connected()
 Label2.Text = "Connected - press Fetch"
End Sub

Private Sub Button1_Click()
 If Not WebClient1.IsBusy Then
   Label2.Text = "Fetching..."
   WebClient1.Get "http://192.168.1.10/weather"
 End If
End Sub

Private Sub WebClient1_Response()
 If WebClient1.StatusCode = 200 Then
   Gauge1.Value = JSONNumber(WebClient1.Body, "current.temperature_2m")
   Label2.Text = "Temperature: " & JSONValue(WebClient1.Body, "current.temperature_2m") & " C"
   ProgressBar1.Value = JSONNumber(WebClient1.Body, "current.relative_humidity_2m")
   Label3.Text = "Humidity: " & JSONValue(WebClient1.Body, "current.relative_humidity_2m") & "%"
 Else
   Label2.Text = "HTTP " & WebClient1.StatusCode
 End If
End Sub

Private Sub WebClient1_Error()
 Label2.Text = "Request failed"
 Debug.Print WebClient1.ErrorText
End Sub


Great for Weather stations, IoT hubs, internet clocks, and displaying live external web data on Gauges, Labels, and Graphs.

Peter

ESP32 LCD Design Studio - link
 
tom_g
Regular Member

Joined: 21/02/2023
Location: Switzerland
Posts: 47
Posted: 07:04pm 02 Dec 2026
Copy link to clipboard 
Print this post

Good evening Peter,

with my very limited network knowledge I have desperatly tried to establish a web socket connection between BBVDBS from within Brave browser and "Socket tool" (V1.3.0) testapp (Playstore) which supports web sockets in Android.
No success however.

Could you please give the minimal necessary setup example for a working ws in the form of controls reference example 10c (similar to 10b in help) and, if possible, the settings in the "socket tool" app ?

Thank you in advance and best regards:
Thomas
 
Batteryman
Regular Member

Joined: 05/04/2016
Location: United Kingdom
Posts: 57
Posted: 07:35pm 02 Dec 2026
Copy link to clipboard 
Print this post

Hi Thomas,

I'm sorry your having issues, it is frustrating when you are trying to accomplish something!
I'll look into this for you.

Thanks for giving BBVDS a go.

Rs

Peter
 
tom_g
Regular Member

Joined: 21/02/2023
Location: Switzerland
Posts: 47
Posted: 07:56pm 02 Dec 2026
Copy link to clipboard 
Print this post

Hi Peter,

thank you very much for your generousity !
Please take your time, I see you're very busy with LCDVDS.

BBVDS: With my hope it is of public interest, too.

Best regards, Thomas
Edited 2026-12-03 05:57 by tom_g
 
Batteryman
Regular Member

Joined: 05/04/2016
Location: United Kingdom
Posts: 57
Posted: 08:55pm 02 Dec 2026
Copy link to clipboard 
Print this post

Cheers,  
 
Batteryman
Regular Member

Joined: 05/04/2016
Location: United Kingdom
Posts: 57
Posted: 12:11pm 03 Dec 2026
Copy link to clipboard 
Print this post

tom_g

Ive moved this post to a new topic:

BBVDS link


Peter
 
Batteryman
Regular Member

Joined: 05/04/2016
Location: United Kingdom
Posts: 57
Posted: 10:51am 04 Dec 2026
Copy link to clipboard 
Print this post

Hi All,

Last year i did some work with a client using web cams and ESP-CAM's. We used NEC parallel displays to do display live stream video.  I thought it maybe useful addition to this ESP32 LCD Design Studio! I have transferred the code over to play in my little sandsbox!

1. Can SPI LCDs cope with live moving video?

Yes, it can, stills / Snapshots: Instantaneous (typically 50–90 ms). The camera captures a frame directly to PSRAM and the ESP flushes it to the LCD.


   What about Live Video / Viewfinder:

       At standard 320×240 (QVGA) resolution (like the ILI9341 or ST7789), an SPI bus running at 40 MHz with DMA transfers an entire 16-bit color frame in just around 31 ms.

       On an ESP32-S3 (which has hardware SIMD vector instructions for rapid image conversion), you can achieve 15 to 25 frames per second (FPS) direct to an SPI screen. That is more than fast enough to feel like smooth live video in a handheld viewfinder or security monitor.
       At 480×320, frame rates hover around 10 to 14 FPS, which is still very usable.

If you like this feature then i'll spend time adding it! I probably willanyway...!  

Peter
ESP32 LCD Designer Studio - link
 
     Page 3 of 3    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026