Write small scripts in the browser, run them on an ESP32, control LEDs and pins, build a live UI, connect over USB or MQTT, and let the AI assistant help shape code and documentation around the project you are making.
Code, upload, stop, inspect logs, and recover sketches from the board.
Keep projects as revisions with code, chat, specification, and circuit notes together.
Drive LED strips, pins, sensors, environment-aware behavior, browser controls, online data, and Home Assistant entities.
Read the full guide here:
https://madshobye.github.io/Portal/p1_embed/web/guide/guide.html
How to use the interface:
https://madshobye.github.io/Portal/p1_embed/web/guide/first-run.html
To edit and code for xobit use the online editor.
https://madshobye.github.io/Portal/p1_embed/web/?view=coding
A basic NeoPixel example drives a 144-pixel WS2812B strip from GPIO16 with GPIO18 used as the strip power pin.
Behavior
Powers the strip on at startup.
Runs a simple blue chase across the LEDs.
Leaves a short dim trail behind the moving pixel.
Loops continuously with a steady frame rate.
Hardware
Strip data: GPIO16
Strip power: GPIO18
Strip type: WS2812B NeoPixel-style LED strip
Brightness: fixed at a moderate level
// Basic NeoPixel chase with strip power control.
var stripPin = 16;
var powerPin = 18; // xobit-circuit: IO18 ledStrip
var stripIndex = 0;
var ledCountValue = 50;
var baseBrightness = 50;
var chasePos = 0;
var lastFrameAt = 0;
var frameIntervalMs = 80;
function setup() {
pinMode(powerPin, OUTPUT);
digitalWrite(powerPin, HIGH);
ledConfig(stripIndex, stripPin, ledCountValue, baseBrightness);
ledClear(stripIndex, 1);
}
function loop() {
var now = 0;
var i = 0;
now = millis();
if ((now - lastFrameAt) < frameIntervalMs) {
delay(10);
return;
}
lastFrameAt = now;
ledClear(stripIndex, 0);
ledSet(stripIndex, chasePos, 0, 0, 255);
i = chasePos - 1;
if (i >= 0) {
ledSet(stripIndex, i, 0, 0, 80);
}
i = chasePos - 2;
if (i >= 0) {
ledSet(stripIndex, i, 0, 0, 20);
}
ledShow();
chasePos = chasePos + 1;
if (chasePos >= ledCountValue) {
chasePos = 0;
}
delay(5);
}