Woohoo! My DiyIrTower PCBs have arrived!

("Do-it-yourself infrared serial communication tower (compatible with LEGO IR serial tower)")

See also: https://github.com/maehw/DiyIrTower, https://github.com/maehw/WebPBrick/

#WebPBrick #KiCad #OpenHardware #electronics

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?
Had another debugging session for #WebPBrick to talk to the #LEGO #Mindstorms RCX programmable brick over USB. Either the LEGO USB tower or WebUSB or JavaScript async programming (chaining of microtasks?) or multiple of them are giving me headaches. I keep losing data on in transfers. At least I can detect those errors in various ways. Every second time I need to detach and re-attach the USB device or I won't get any data out of it. I already added some workaround to fix incomplete prefixes.

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

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

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

Another iteration of the #LEGO #Technic + #Mindstorms #RCX based pen #plotter – based on set 8094. I finally understood how to retain the pen as intended by the original instructions - must have missed that before. Also added the "pen up/down" feature (another motor) - and this is why you do no longer see the inter-connecting lines from my last post. But, the pen is wobbly... and so are the lines now. Not too happy with this result. But it works. Used #WebPBrick + #NQC.

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

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

Attached: 2 images Found some more free time to work on the #LEGO #Technic + #Mindstorms #RCX based pen #plotter – based on LEGO set 8094. Thanks for pointing me to the Commodore 1520 plotter from where I took the encoded letters of the font from ROM and converted it to segment movements. The font can by the way be found as "FifteenTwenty" for the computer ‐ which helped me to have a reference. Still need to add a "pen up/down" feature and fix other issues... but it works. Kinda.

chaos.social