I am currently testing the #LEGO #Mindstorms #RCX analog clock. The NQC source code distributed with the original model does not compile in #WebPBrick's #WebNQC. Not too wild, as the main logic has been commented. I've added a touch sensor to initially set the clock during startup. And the light-based rotation sensor code has been replaced by code that handles the normal rotation sensor. 1/2

https://chaos.social/@maehw/112535002818247029

Mäh W. (@[email protected])

Attached: 2 images I've rebuilt Ben Williamson's "analog clock" #LEGO model which uses the #Mindstorms #RCX. Unfortunately, I do not have the fiber-optic component which he had used as rotation sensor. The rotation sensor I have still needs have its broken wire fixed. The clock gear defines a ratio so that the it needs to be driven with 48 discrete steps per hour (4 out of 5 minutes). Its programmed in #NQC. Mike Brandl has shared the PDF manual for this ancient technology on his website: https://lego.brandls.info/legbau.htm

chaos.social

I've been able to fix my precious #LEGO #Mindstorms rotation sensor for the #RCX. It had the flaky wire syndrom. I then also used #WebNQC (Blockly-based) visual programming to generate some test code. I can now slowly move the axle and play sound dependent on the direction of rotation. A full circle gives 16 impulses.

#WebPBrick #robotics #stem #hacking #making

I am on a long train journey and had plenty of time to work on WebPBricks - the web browser based IDE for the LEGO Mindstorms RCX (the yellow programmable brick of the first Mindstorms generation). The goal was to get started in developing a block based programming frontend - and I am quite happy with these intermediate results (based on Blockly). Not published yet... but the generated code compiles successfully.

#LEGO #Mindstorms #RCX #WebPBricks #WebNQC #WASM #robotics #robots #stem #pbrick

The late 90ies called and they wanted their website UI/UX back. Well, this isn't a nice interface yet - because it's lacking any thought about design, usability and accessibility. It's more a hack of: how can I access command line tools from the browser as a proof of concept.

Today, I removed RCX and IR tower ("link") communication from #WebNQC as the whole communication thing shall be implemented using the Web Serial API. Also made the #WASM file shrink! 🥳

Revive #Mindstorms 1st generation.

Another small step is made!

#WebNQC dev environment that runs in the browser is making progress. Now able to compile user-modifiable code on demand (button press). Took me some effort, but I am understanding emscripten+WASM and JavaScript a little bit better now.

Also published those latest changes, in case you want to play around yourself:
https://github.com/maehw/WebNQC

Next thing to do: integrate with the Web Serial API based download. I need to understand the binary output first. #Mindstorms

GitHub - maehw/WebNQC: NQC (Not Quite C) is a programming language for several Lego MindStorms products, including the RCX, CyberMaster, and Scout. This repo is used to compile NQC as WebAssembly bytecode (WASM) so that we can run it in a browser.

NQC (Not Quite C) is a programming language for several Lego MindStorms products, including the RCX, CyberMaster, and Scout. This repo is used to compile NQC as WebAssembly bytecode (WASM) so that ...

GitHub

No way, I almost can't believe it: Not Quite C (NQC) compiled in a webbrowser!

Today I played around with Emscripten and Web Assembly.

I was able to build a WASM file for the NQC bytecode compiler! This means that we could build a little IDE just to build code for the 1st generation LEGO #Mindstorms - the yellow #RCX bricks! I am also looking forward to exploring Web Serial API which should then also allow to load the binaries on the brick (with an IR tower).

Maybe we can call this #WebNQC?