maehw
Eurobricks Vassals-
Posts
44 -
Joined
-
Last visited
About maehw

Spam Prevention
-
What is favorite LEGO theme? (we need this info to prevent spam)
Mindstorms
-
Which LEGO set did you recently purchase or build?
LEGO 51515 MINDSTORMS
Profile Information
-
Gender
Not Telling
-
Interests
Electronics, programming, ...
Extra
-
Country
Germany
Recent Profile Visitors
1,194 profile views
-
Hi everyone, I am sorry but I can't keep up with the speed new posts arrive here. Great to see that everyone around is quite active and motivated what I've seen from my little email snippets. I am unfollowing this thread for a while and hopefully will get myself updated... So long, and thanks for all the fish.
-
maehw started following Lego Smart Brick General Discussion/Concerns Topic
-
Lego Smart Brick General Discussion/Concerns Topic
maehw replied to a_clay_brick's topic in General LEGO Discussion
Hi, thanks! The slides themselves are available via short link t1p.de/sbrick -
Lego Smart Brick General Discussion/Concerns Topic
maehw replied to a_clay_brick's topic in General LEGO Discussion
For the technically interested: there's this guy who gave a talk: It's in German but I think most things on the slides can still be guessed in English. Hacking LEGO Smart Play – was steckt hinter den „magischen Steinen“? https://media.ccc.de/v/tdf5-133-hacking-lego-smart-play-was-steckt-hinter-den-magischen-steinen- Disclaimer: that guy is me. Please leave feedback! 🙃 The talk is also on YouTube in case you want to comment over there. -
As this seems to be referring to the serial/parallel converter: I had slightly modified Toastie's code and pushed it to this git repo on GitHub: https://github.com/maehw/BrickLines/blob/main/hardware/serial2parallel_converter/arduino_sketch/arduino_sketch.ino Have a nice weekend, folks.
-
You're right. But this is basically only a static website. So you should totally be able to run this locally if I currently don't miss anything. But the idea here was to have a tool working in a web browser - so that it's OS independent aka cross-platform. A driver behind this was curiosity for the "new" technology behind it (WebSerial, Web Assembly/ASM and theoretically WebUSB). But: this technology also has its drawbacks because its requires a browser supporting these technologies and for WebSerial this seems to be limited to Chromium-based web browsers. And Chrome is some Google foo. Code is FOSS on GitHub - see feel free to download, modify, etc. -- https://github.com/maehw/WebPBrick (might move or be mirrored to Codeberg some day). And yeah, there's a version hosted by myself which runs under the domain webpbrick.com -- and there's no guarantee for that service to exist forever. Afair there's another user trying to build a universal pbrick tool in Python but I haven't looked at it yet.
-
Hi @Bliss, thanks for your reply! There's not a broad user basis... so I haven't gotten too much feedback so far. Thanks for letting me know. About `until`: Yes, there's the block `repeat while/until <condition>`: You say "And I do not find a matching block for until. I had to use repeat until which is not the same... " - in my understanding, it is. You simply leave the loop's body empty. But yeah, we could add another block that does not provide a loop body... so that you cannot plug something in here (you don't have to, though). Also, from the NQC documentation: NQC also defines the until macro which provides a convenient alternative to the while loop. The actual definition of until is: #define until(c) while(!(c)) In other words, until will continue looping until the condition becomes true. It is most often used in conjunction with an empty body statement: until(SENSOR_1 == 1); // wait for sensor to be pressed It seems that my BlockNQC generator does not make use of that macro. Out of curiosity, I've thrown both versions into WebNQC: task main() { while (!(Message() == 11)) { } } task main() { until (Message() == 11) { } } They both compile to the same byte code (which totally makes sense as a macro will be replaced by the preprocessor already): ↪️ nqc version 3.2 r2 (built Jul 5 2024, 02:23:32) ↪️ Copyright (C) 2005 John Hansen. All Rights Reserved. 🕵🏻 Compiled NQC code successfully using WebNQC. 🕵🏻 Binary output length: 41 🕵🏻 Binary output as HEX: 0x52 0x43 0x58 0x49 0x02 0x01 0x01 0x00 0x01 0x00 0x03 0x00 0x00 0x00 0x0E 0x00 0x13 0x07 0x02 0x07 0xE1 0x87 0x95 0x82 0x0F 0x0B 0x00 0x00 0xFA 0xFF 0x00 0x00 0x00 0x00 0x05 0x00 0x6D 0x61 0x69 0x6E 0x00 🕵🏻 Compiled NQC code successfully using WebNQC. 🕵🏻 Binary output length: 41 🕵🏻 Binary output as HEX: 0x52 0x43 0x58 0x49 0x02 0x01 0x01 0x00 0x01 0x00 0x03 0x00 0x00 0x00 0x0E 0x00 0x13 0x07 0x02 0x07 0xE1 0x87 0x95 0x82 0x0F 0x0B 0x00 0x00 0xFA 0xFF 0x00 0x00 0x00 0x00 0x05 0x00 0x6D 0x61 0x69 0x6E 0x00 There's at least one other user - a teacher from Brazil - who's trying to get the serial communication working. They've been trying to build the DiyIrTower. I guess you're using the original LEGO IR Serial tower + the adapter, right? Two things you can do: - Try https://test.webpbrick.com/ide/index.html and see if it behaves differently - Go to browser tools > web developer tools and inspect the console log. Those provide very detailed communication logs, i.e. every transmitted/received messages with all their bytes. This may help... however also consume a significant amount of time to narrow this down. It may be a problem with the USB/serial adapter picking up some noise... leading to UART framing or parity errors. But it could also be something else (UART timing?). The firmware download currently isn't very stable, unfortunately. I think the same retry mechanism as the one of Bricxcc should be used as it seems to work very reliably. Thanks for trying out this project! :)
-
Lego Smart Brick General Discussion/Concerns Topic
maehw replied to a_clay_brick's topic in General LEGO Discussion
I've heard rumours that Pokémon is going to be the next set equipped with Smart Bricks... and maybe Smart Tags. Saw some sets today in a store but could still resist. That's really a lot of money and most reviews have been... bad. -
I wasonly entering those commands directly into the lower part. On the 'TURTLE' page if that is relevant — but actually without explicitly executing procedures from that page.
-
Hi everyone! I've got a question about LEGO TC logo. There's the `talkto` (short `tto`) command to select the output port(s) to be operated on (switched on/off, flash, etc.). The reference manual states: "There are nine outlet ports (A, B, C, 0, 1, 2, 3, 4, 5)". In my understanding A/B/C can be used bi-polar, e.g. to attach motors whose direction can be changed (`rd`, `setodd`, `seteven`) -- i.e. enabling to turn them CW and CCW. And ports 0-5 can be used in a uni-polar fashion, e.g. switching motors only on and off. When I use the LEGO TC logo Apple //e emulator, I get the error message "Can't use adjacent ports" for `tto 0` and `tto 1` (or `tto "0` and `tto "1`) while the other outlet port names work fine. Is that a bug or is there a reasonable explanation for that? Cheers Mäh
-
Perfect, thanks! Alt + U/D does the trick on the MacBook I am currently working on. Cheers! Have a nice weekend everyone
-
Hi everyone, thanks for providing more code and explanations. I've now taken a look into LEGO TC logo. Also thanks @evank for the reference guides for both Interface A and B! Can someone please guide me how to use the emulator on https://archive.org/details/LEGO_TC_Logo? How can I navigate a page (e.g. "TURTLE")? It seems that the cursor only moves in the lower part (the "command center" as it's called IIRC.. maybe mixing it up with the name of the input field in ControlLab though). Cheers Mäh
-
That's great! Are you willing to share the code and explain? Is it like controlling the direction by key presses?
-
I stumbled across this dead cheap Interface A listing on eBay from a seller in the US: ~21 $, unknown state, no power supply https://www.ebay.de/itm/336353044675 If I wouldn't already own one, I'd consider buying it. Probably not too attractive for Europeans though as shipping is expensive and customs these days probably, too. Cheers, Mäh
-
Dacta Control Lab Software
maehw replied to Dazmundo's topic in LEGO Technic, Mindstorms, Model Team and Scale Modeling
Thanks everyone for sharing their knowledge and fun projects! This is what the web-based program currently looks like (I am really bad at CSS, so this is pretty much hacked together): You can control outputs (switch them on and off and set their polarity). No slider for output power yet, but that should be pretty easy to add. You can also read sensor inputs -- as boolean and as raw values. It's just that the UI becomes more and more confusing when not properly designed. I've currently decimated the output rate by a factor of 10 (configurable in software of course) -- which still gives a nice responsiveness, but does not provide enough data when you really want to dive into the details when working with the rotation sensor. If you want, you can uncomment several `console.log()` calls to see more details such as every decoded received frame. This is really fun! @AJB2K3 nice blog posts, Adam. It seems that you do not check the checksum byte in the frame. This may work when you always read the 19 bytes when always perfectly in sync and no byte is ever dropped. -- Python is a very good choice to be platform-agnostic. I'd do the same, if I wasn't experimenting with the web tools... -- also don't want to bother the user to install a Python environment. Still, my solution "only" requires a web browser that supports WebSerial.. which Firefox for example unfortunately does not. So this is also a limitation for the usable environments. Besides that, no installation/configuration should be required. Those of you who are more familiar with the ecosystem -- some official TLG software uses or generates LOGO code, right? Is this the same "dialect" as used with Interface A? So far only "worked" with LEGO Lines... ;) IMO it'd be fun to get a LOGO programming language interpreter working in the browser and running it in interaction with the Interface B. -
Dacta Control Lab Software
maehw replied to Dazmundo's topic in LEGO Technic, Mindstorms, Model Team and Scale Modeling
Hi all! I've been playing around with the WebSerial POC every couple of days. And it looks nice so far. "Only" a WebSerial-capable browser is needed to control an Interface B with a "modern system", no RPi in the middle (IMHO -- I may still run into performance issues though). Dear @Toastie, I am not 100% sure if this was the latest diagram posted by you. Concerning the pressed stop button in the first byte (you call it byte #1): for me the indicating bit is bit 4, i.e. I read 0x10 when the button is pressed and 0x00 when the button is released. I am not sure if this is a typo/error in your diagram or there are really different revisions of the ROM code out there. Cheers, Mäh PS: In case anyone is interested in this kind of technology, let me know and I'll upload my code some day. I think I'll open source this anways, but always motivated by others to do it rather sooner than later. And happy for feedback and improvements. ;) ____ Edit: If anyone of you who is reading this is located in the EU and willing to sell me a compatible temperature sensor, please get in touch with me!