Sneak peek -- woohoo. My first PCB in like 15 years or so. And the first #KiCAD design. Thanks to the tutorial I've been following along, this doesn't look to bad. Made a PCB for the DiyIrTower (DIY infrared serial communication tower for the #LEGO #RCX). Doesn't look that bad in the 3D viewer! I might finalize this by the start of next week. Does anyone want to have a look at the schematics and/or layout?
#openHardware #openSource #webPBrick
Today, I've been working on #WebPBrick again. One thing is input validation - which is where I've made progress. The second thing was working on support for the #LEGO USB IR tower... this thing is giving me headaches, though. It seems that using the USB TX endpoint works... the IR tower also receives data which can be seen in the statistics - but the USB RX endpoint stays silent. Will have to do some logic analyzer measurements in the future, I guess. Are there any spare #Mindstorms #RCX around?
FOSS Advent Calendar - Door 8: Programming LEGO Robots with NQC

Today we explore NQC (Not Quite C), a wonderfully nerdy and lightweight programming language for the classic LEGO Mindstorms RCX robot brick.

Inside the RCX lives a tiny 8-bit Hitachi H8/300 CPU running at about 16 MHz together with 32 KB of RAM. Even with this extremely small hardware budget, the RCX can handle multitasking, read sensors, control motors and communicate via infrared. It feels like pure retro embedded magic.

NQC lets you write C-like programs on your computer and upload them directly to the RCX. It is minimalistic, fast, easy to learn and perfect for anyone who loves old-school robotics or wants to revisit the early days of DIY programming before Raspberry Pi and Arduino existed.

Working with NQC is a wonderful reminder of how much creativity is possible with almost no resources. Watching a tiny 32 KB robot happily execute parallel tasks still feels incredibly charming today.

Pro tip: If you still have an RCX somewhere, power it up. These yellow bricks are more alive than you remember once you start programming them again.

Link: https://github.com/BrickBot/nqc

Which small robot would you build or revive with the RCX?

#FOSS #OpenSource #Linux #CLI #Terminal #NQC #Mindstorms #LEGO #RCX #Robotics #Embedded #RetroComputing #NerdContent #AdventCalendar #Adventkalender #Adventskalender #TechNerds #STEM #Programming #Fediverse #FOSSAdvent #OpenTools #Robotik #OldSchoolTech
Random thought: #LEGO #Mindstorms #RCX(!) to LEGO #DUPLO adapter plate/housing.

Dear chaos bubble,

during #37C3 there were two scheduled meetups: "Bällebad-Sortiermaschine // Let’s build a ball pit sorting machine (MeetUp)
flair" - Did any plans turn up from this?

Also, I could provide you with some oldschool #LEGO #Mindstorms #RCX (from the first generation).

#38C3 #bällebad #sortiermaschine

Wooohoo. I've been able to talk to my #LEGO #Mindstorms yellow programmable #RCX brick. This time via the infrared USB(!) tower (and not the serial one)... via WebUSB in the browser. This is lacking some robustness still.. but loading firmware and user programs compiled from NQC doesn't feel to far away. Just pushed the experimental code to the #WebPBrick git repository.

Could still need some help getting my JavaScript right though (less hacky, more robust): https://chaos.social/@maehw/112832014771094684

Mäh W. (@maehw@chaos.social)

Attached: 2 images Dear folks of #JavaScript #async #programming. This #Promise stuff is still voodoo to me. Any simple solution to set a timeout on this byte-receiving loop? I have to collect data from an USB IN endpoint... and let's assume(!) I don't know when I am done (how much data to receive) so that I always have to cancel the last started `transferIn` (#WebUSB) after a timeout (let's say 500 milliseconds). How would you do it? I've trued hacky Promise/timeout stuff, but don't feel comfortable with it.

chaos.social
I got a beep out of my #LEGO #Mindstorms #RCX programmable brick. Basically not a big deal... BUT: this time using the *USB* infrared tower and not the *serial* one. And on a 64-bit system. Using the WebUSB API. This is possible thanks to @HangryDave's InfraredBrickTower project, more USB analyzing and reading the device's spec docs again. So firmware update and programming in the #WebPbrick IDE seems to be doable. Pushed the hacky PoC to the github repo, check out src/communication/webusb.htm.

Wrote a "high level USB decoder" which sits on top of Saleae's USB LS/FS analyzer so that I can see the really relevant data. Should help getting me the #LEGO #USB Infrared Tower for the #Mindstorms #RCX analyzed better... and maybe provide #WebUSB support on #WebPBrick some day. Sometimes you cannot to see the wood for the trees. (I was surprised recently that this saying could be translated from German to English 1:1.) Planning to open source the tool.

#hardwarehacking #reverseengineering

Another day playing around with the #LEGO #Mindstorms #RCX:

This time, I've reactivated some #brickOS demo files. I just found out that I had installed the toolchain on my Debian-based laptop earlier but never really tried it out. It works!

You can now let a GitHub action build brickOS user programs for you: https://github.com/maehw/BrickOsTest

More details here:
https://maehw.wordpress.com/2024/06/23/using-l%cc%b5e%cc%b5g%cc%b5o%cc%b5s%cc%b5-brickos-for-the-lego-mindstorms-rcx-after-25-years/

👀 @luis_in_brief you migt be interested.  - Can you confirm that the `dll` download utility is based on LNP?

GitHub - maehw/BrickOsTest: Testing brickOS

Testing brickOS. Contribute to maehw/BrickOsTest development by creating an account on GitHub.

GitHub

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. (@maehw@chaos.social)

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