flash force Wiki
Interactive browser →
Wiki / Other software
#tool#vll#ir

lego-blockly

A Blockly environment in the browser that drives LEGO interfaces from Interface A to LPF2. JavaScript with a little C++, installable as an app.

VLL support

It explicitly supports "Virtual Light Link (Code Pilot, MicroScout)" alongside Interface A/B, RCX/ControlMaster, WeDo, and LPF2.

VLL implementation (device/DeviceLegoVLL.js)

Send VLL to a Micro Scout (quick start)

  1. Open the live editor in Chrome/Edge (needs Web Serial). Wire a genuine FT232R/FT232H + red LED on the DTR pin — see lego-blockly.
  2. Pick the VLL (Code Pilot/MicroScout) device and Connect (Web Serial picker).
  3. Drop a vll_senddata block with a code from the VLL opcode table (e.g. 0 forward, 4–8 beeps, 33 Run, 34 Delete); tune vll_preamblems / vll_unitms if needed.
  4. RunHighlight Execution shows the active block, Log shows what was sent.

Build a stored program = Delete (34) → script steps 16–32Run (33), same flow as Flash Force.

Other devices

Serial via USB-RS232 / HC-05 BT / BLE / WebSocket. SketchArduino/ is Interface A firmware.

Significance

A second implementation of the VLL frame, written from another codebase, and an emitter that is one diode on a serial control line.

How it drives the light

The browser side is one call: Web Serial's port.setSignals({dataTerminalReady}) drives a serial control line high and low, and a diode on that line is the whole emitter. Edges are timed by busy-waiting on performance.now() rather than by setTimeout, which is why its 20 ms unit holds.

The same job can be done from Python instead of a browser, with vllftdi.py from JorgePe/mindstorms-vll. One trap: pass auto_detach=False, or it segfaults.