Wiki / Tools & Software
lego-blockly
lego-blockly is a web (Blockly) visual programming environment for many LEGO interfaces. It is written in JS plus a bit of C++ and is an installable PWA.
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)
- Emitter = LED on the FTDI DTR pin via Web Serial → FTDI DTR + LED.
sendVLL(data7): preamble 1000 ms, start, 3 checksum bits + 7 data bits MSB-first, stop (ON 1u / OFF 3u).unit = 20 ms.- VLL checksum =
7-((n+(n>>2)+(n>>4))&7)— identical to the one used by Flash Force. - Opcodes are entered by the user (no built-in table); blocks:
vll_senddata,vll_preamblems,vll_unitms.
Send VLL to a Micro Scout (quick start)
- Open the live editor in Chrome/Edge (needs Web Serial). Wire a genuine FT232R/FT232H + red LED on the DTR pin — see FTDI DTR + LED.
- Pick the VLL (Code Pilot/MicroScout) device and Connect (Web Serial picker).
- Drop a
vll_senddatablock with a code from the VLL opcode table (e.g.0forward,4–8beeps,33Run,34Delete); tunevll_preamblems/vll_unitmsif needed. - Run — Highlight Execution shows the active block, Log shows what was sent.
Build a stored program = Delete (34) → script steps 16–32 → Run (33), same flow as Flash Force.
Other devices
Serial via USB-RS232 / HC-05 BT / BLE / WebSocket. SketchArduino/ is Interface A firmware. It is a reference for multi-interface communication.
Significance
The tool provides the FTDI-DTR emitter approach and an independent confirmation of the VLL protocol.
Links
- Live editor (try it in the browser): blissca.github.io/lego-blockly
- github.com/BlissCA/lego-blockly