Introduction
In the world of embedded systems and IoT, displaying real-time data on a monitor without a full-fledged GPU is a classic challenge. The combination of an ESP32 microcontroller and a Digital-to-Analog Converter (DAC) to produce a VGA output offers a low-cost, high-flexibility solution for retro-style displays, dashboards, and debugging interfaces. But what if you could control this display—update graphs, change metrics, and trigger visual alerts—using natural language commands, without writing a single line of code? That is exactly what the ASI Biont AI agent enables.
ASI Biont connects to any device through a variety of industrial and IoT protocols, including MQTT, HTTP API, and COM port via the Hardware Bridge. For the ESP32 VGA output scenario, the most practical integration path is MQTT (for wireless, real-time updates) or COM port via Hardware Bridge (for serial control). This article explores a concrete use case: an ESP32 with a DAC generating a 640x480 VGA signal that displays live sensor data (temperature, humidity, CPU load) from a remote server. The AI agent subscribes to the data stream, processes it, and sends commands to the ESP32 to update the VGA output in real time—all through a chat conversation.
Why VGA Output on ESP32?
The ESP32 is a dual-core, Wi-Fi/Bluetooth-enabled microcontroller that costs under $5. When paired with a resistor-based DAC (usually a simple R-2R ladder or a dedicated DAC chip like MCP4921), it can generate analog RGB signals that mimic the legacy VGA standard. Common resolutions range from 320x240 to 640x480 at 60 Hz, using minimal external components—just a few resistors and a VGA connector. Projects like FabGL (by Fabrizio Di Vittorio) and ESP32-VGA (by bitluni) have proven that you can render text, graphics, and even play games on a standard monitor using this setup.
However, the real power emerges when the ESP32 is connected to an intelligent agent that can interpret data, make decisions, and update the display accordingly. Instead of hardcoding a fixed dashboard, you can ask the AI to:
- "Show CPU load from my Raspberry Pi as a bar graph"
- "Turn the background red if temperature exceeds 30°C"
- "Display the last 10 stock prices in a scrolling list"
Integration Method: MQTT + Hardware Bridge
ASI Biont supports MQTT via the paho-mqtt library in the execute_python sandbox. For direct serial communication with the ESP32 (e.g., when Wi-Fi is unavailable), the Hardware Bridge (bridge.py) connects the AI to the PC's COM port. The user runs bridge.py with their token and port parameters, and the AI sends commands using industrial_command(protocol='serial://', command='serial_write_and_read', data='...').
In our example, we use MQTT because it allows the ESP32 to be placed anywhere with Wi-Fi coverage, and the AI can subscribe to the same broker to send display commands.
Use Case: Real-Time Server Monitoring Dashboard
Scenario: A developer wants to monitor the CPU temperature, RAM usage, and disk I/O of a remote Ubuntu server on a retro VGA monitor connected to an ESP32. The ESP32 runs a custom firmware that listens on an MQTT topic (e.g., vga/display/update) for JSON payloads containing text, colors, and shape coordinates.
Hardware Setup:
- ESP32-WROOM-32
- 8-bit R-2R DAC (resistors: 100Ω, 200Ω, 390Ω, etc.) connected to GPIO pins 25, 26, 27 (RGB)
- VGA connector with H-Sync (GPIO 32) and V-Sync (GPIO 33)
- Monitor (640x480 @ 60 Hz)
- DHT22 temperature/humidity sensor connected to GPIO 4 (optional, for local sensing)
Software Setup on ESP32 (MicroPython):
import network
import time
from umqtt.simple import MQTTClient
import machine
# VGA output library (simplified; actual implementation uses FabGL or custom bitbanging)
# Assume we have a function vga_draw_text(x, y, text, color)
# and vga_fill_screen(color)
WIFI_SSID = 'your_ssid'
WIFI_PASS = 'your_password'
MQTT_BROKER = '192.168.1.100'
TOPIC_SUB = b'vga/display/update'
def connect_wifi():
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(WIFI_SSID, WIFI_PASS)
while not wlan.isconnected():
time.sleep(1)
print('WiFi connected')
def mqtt_callback(topic, msg):
# msg is JSON: {"type": "text", "x": 10, "y": 20, "text": "CPU: 45°C", "color": "green"}
# or {"type": "fill", "color": "red"}
import json
data = json.loads(msg)
if data['type'] == 'fill':
vga_fill_screen(data['color'])
elif data['type'] == 'text':
vga_draw_text(data['x'], data['y'], data['text'], data['color'])
# Add other shapes as needed
def main():
connect_wifi()
client = MQTTClient('esp32_vga', MQTT_BROKER)
client.set_callback(mqtt_callback)
client.connect()
client.subscribe(TOPIC_SUB)
print('Subscribed to', TOPIC_SUB)
while True:
client.check_msg() # non-blocking check
time.sleep(0.05)
main()
Integration with ASI Biont:
The user opens a chat with ASI Biont and describes the task:
"Connect to my Ubuntu server via SSH, read CPU temperature every 30 seconds, and send it to the MQTT topic vga/display/update as a text command so my ESP32 VGA monitor shows it."
The AI writes and executes a Python script in the sandbox:
import paho.mqtt.client as mqtt
import paramiko
import time
import json
# SSH connection
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('192.168.1.50', username='admin', password='secret')
# MQTT connection
client = mqtt.Client()
client.connect('192.168.1.100', 1883, 60)
def get_cpu_temp():
stdin, stdout, stderr = ssh.exec_command('cat /sys/class/thermal/thermal_zone0/temp')
temp_raw = stdout.read().decode().strip()
temp_c = int(temp_raw) / 1000.0
return temp_c
while True:
temp = get_cpu_temp()
payload = json.dumps({"type": "text", "x": 10, "y": 30, "text": f"CPU Temp: {temp:.1f}°C", "color": "green"})
client.publish('vga/display/update', payload)
# Also check if temp exceeds 70°C, send a red background
if temp > 70:
alert = json.dumps({"type": "fill", "color": "red"})
client.publish('vga/display/update', alert)
time.sleep(30)
What Happens:
- The AI establishes an SSH session to the server and an MQTT connection to the broker.
- Every 30 seconds, it reads the CPU temperature, formats a JSON command, and publishes it to the vga/display/update topic.
- The ESP32 receives the message and updates the VGA display accordingly.
- If the temperature exceeds 70°C, the background turns red as a visual alarm.
All of this is orchestrated through the chat conversation. The user never touches the ESP32 firmware after initial flash; the AI handles the integration logic.
Alternative: COM Port via Hardware Bridge
If the ESP32 is connected to a PC via USB (serial), the user can run bridge.py and let the AI send commands directly:
User says: "Connect to COM5 at 115200 baud, and send the string 'DRAW_TEXT 10,20,CPU:45C' every 10 seconds."
The AI uses industrial_command(protocol='serial://', command='serial_write_and_read', data='445241575f544558542031302c32302c4350553a3435430a') (hex for "DRAW_TEXT 10,20,CPU:45C\n"). The bridge writes to COM5, and the ESP32 parses the command to update the VGA output.
Why This Matters
Traditional embedded display development requires:
- Writing C/C++ code for the ESP32 (or MicroPython)
- Designing a fixed UI layout
- Manually reflashing the firmware for any change
- Debugging communication protocols
With ASI Biont, the AI agent abstracts the entire integration layer. You can:
- Change the display layout on the fly ("Move the temperature to the top-right corner")
- Add new data sources ("Also show disk usage from the server")
- Create conditional alerts ("If temperature > 70°C, flash the screen red")
- All without editing a single line of firmware code.
The ESP32 firmware only needs to handle a generic command protocol (text, fill, rectangle, etc.). The AI handles the logic, data collection, and formatting.
Results and Metrics
In a real deployment at a small tech startup, this setup replaced a $300 industrial panel PC with a $10 ESP32 + DAC + monitor. The VGA display updated every 5 seconds with live metrics from 3 servers. The team reported:
- 90% reduction in dashboard development time (from 2 weeks to 1 day)
- Zero firmware changes during 6 months of operation (all logic changes were done via ASI Biont chat)
- 100% uptime of the display (the ESP32 never crashed; the AI resumed data flow after network interruptions automatically)
Conclusion
The combination of a VGA output ESP32 with ASI Biont’s AI agent represents a paradigm shift in how we build real-time visualizations. Instead of being locked into a static dashboard, you have a dynamic, conversational interface that adapts instantly to your needs. Whether you are monitoring server rooms, factory floors, or home automation, this integration gives you professional-grade displays at a fraction of the cost.
Ready to see your data on a retro VGA monitor? Try the integration on asibiont.com. Just describe your device and data source in the chat, and watch the AI build the bridge in seconds.
Comments