evank Posted Saturday at 04:29 AM Posted Saturday at 04:29 AM I obliviously did not realize that your method requires a microcontroller. I thought it would allow Blockly to control any vintage Lego interface directly from a PC. I don't own a microcontroller and have very little experience with using them. Quote
Wapata Posted Saturday at 08:05 AM Posted Saturday at 08:05 AM On 4/2/2026 at 7:18 PM, Bliss said: If you just want to send commands to turn on/off motors you may try to use my blockly app who knows, it might work. Try it. (You need to download a firmware into you cybermaster brick first if not done already). I know I do not have all special commands decicated to Cybermaster but some basic command might work... I may check what are the differences and maybe I just need to had few blocks... There is not a single motor movement. But the tower is flashing orders so I guess the protocol of linking the tower to the mobile unit is missing (as BricxCC does see this missing connection). I did not find alternate firmware for CyberMaster. And I guess that if something need to be programmed inside in the futur, it should only be a FailSafe cutting the motor power if link is lost (i have to look if i can do that with BricxCC). Blockly may be better to handle a program using 3 sensors and 3 motors for this device anyway Especially if we consider futur interactions with other devices ! Two CyberMaster ? CyberMaster + Interface-B ? etc Is there a Block to link a computer keyboard key to an action, like pushing A key toggle the motor on and off of interface-B A port ? Ctrl+A+4 push it to speed 4 ? Quote
Toastie Posted Saturday at 08:37 AM Posted Saturday at 08:37 AM 3 hours ago, evank said: I obliviously did not realize that your method requires a microcontroller. Hi Evan, well, as before when this all started, modern computers don't have a parallel interface anymore. At least not anything generic I know. So you need a device that translates the serial data from an USB port (as serial RS232 ports are mostly gone as well ^^) to parallel - preferentially as fast as possible. An Arduino (or virtually any other microcontroller board exposing 8 (I/O) + 2 (COM) I/O pins to the user shall do the trick. They are cheap, readily available, and flexible. It's the same as shown here years ago: For the version of @Bliss, the pinout is different, I believe. I layed it out such that the most of th I/O pins of the board can be directly soldered to the Interface A compatible 20 pin header. Best Thorsten Quote
Bliss Posted Saturday at 01:41 PM Author Posted Saturday at 01:41 PM @Wapata, Did you upload the original firmware (included on the original CD https://archive.org/details/lego-technic-cyber-master-8482)? If it is like the RCX, when you remove or replace batteries, it loses its firmware and you have to upload it again... Quote
Wapata Posted Saturday at 01:44 PM Posted Saturday at 01:44 PM I did not, but it worked with BricxCC anyway. I will dig on that. Quote
Toastie Posted Saturday at 02:28 PM Posted Saturday at 02:28 PM 45 minutes ago, Bliss said: If it is like the RCX, when you remove or replace batteries, it loses its firmware and you have to upload it again... I believe the CM does not have a firmware bootloader. Same with the Scout and Spybots. The CM wants to be unlocked before it starts to talk to you in plain ASCII. BricxCC does that for you upon "connect to brick". Best Thorsten Quote
Bliss Posted Saturday at 04:25 PM Author Posted Saturday at 04:25 PM @Toastie, @Wapata, For the cybermaster I read some informations here and there and also from this thread: Does this mean that to send commands to the CM, the header is different than the RCX and must be FE 00 00 FF rather than 55 FF 00 for RCX? As shown in the above thread, for CM do we really need to send "Unlock" command with string "DO YOU BYTE..." like Int.B (We do not with RCX and it works)? Also, do we really need to send Alive command and if so at what rate? For the RCX, I do not send alive except at the connect... After that I thought it would shutdown it self only after 20 min of NOT receiving any commands... Is it the same with cyber master? I also read about RTS DSR being at +12v ou -12v? I do not understand this part... Do we have to activate theses signal in the program? Thank you... Quote
Bliss Posted Saturday at 07:02 PM Author Posted Saturday at 07:02 PM 10 hours ago, Wapata said: Is there a Block to link a computer keyboard key to an action, like pushing A key toggle the motor on and off of interface-B A port ? Ctrl+A+4 push it to speed 4 ? No, but I like the idea. I will try to add an Interactive Button Block that could be practical specially for testing. I think it would be a good compromise. Quote
Bliss Posted Saturday at 07:55 PM Author Posted Saturday at 07:55 PM @Wapata In the latest version, I added a Button Block. This is an IDE environment for programming Lego Devices to achieve special tasks. It is not meant to be a UI but I think this block can help for debugging and testing... You can put many action in the DO space. Quote
Toastie Posted Saturday at 08:36 PM Posted Saturday at 08:36 PM (edited) 1 hour ago, Bliss said: This is an IDE environment for programming Lego Devices to achieve special tasks. This is again an extremely helpful addition. I was going to ask about "UI" elements, but thought, this may be a too early stage. I personally do recognize LEGO Blockly as a visionary, and powerful development - which evolves on the fly for us - and most importantly, the creator, @Bliss takes special care and is extremely responsive to user input and caring about feasibility issues. It does not get any better, and it is absolutely rarely the case! In response to your inquiries, @Bliss (all my replies are of course AFAIK!): 4 hours ago, Bliss said: Does this mean that to send commands to the CM, the header is different than the RCX and must be FE 00 00 FF rather than 55 FF 00 for RCX? Yes. 4 hours ago, Bliss said: As shown in the above thread, for CM do we really need to send "Unlock" command with string "DO YOU BYTE..." like Int.B (We do not with RCX and it works)? Yes. When that is done, called "unlock", then HTerm or any other terminal program may be used to send commads, as e.g., documented in the NQC reference guide. BricxCC does do that upon connecting to the CM brick, maybe a little further serial port sniffing upon connect could be helpful. 4 hours ago, Bliss said: Also, do we really need to send Alive command and if so at what rate? Hmm. Not sure, but I don't think so. Well - sniffing when BricxCC is running may help. When connected via BricxCC, you stay connected "for ever". I also noted that I can send commands with HTerm as long as I want to. (Flipping the flipping bit of course). 4 hours ago, Bliss said: For the RCX, I do not send alive except at the connect... After that I thought it would shutdown it self only after 20 min of NOT receiving any commands... Is it the same with cyber master? The RCX shuts down, when the shutdown timer is set (by default) to 15 min. You can set any time, and even "0" on the RCX, and it will never power down. Guess how many AA batteries (before changing to NiHM's) I trashed, because I forgot ... 4 hours ago, Bliss said: I also read about RTS DSR being at +12v ou -12v? I do not understand this part... Do we have to activate theses signal in the program? Well, this is what classic RS232 HW protocol sometimes calls for, as you know. It is relating to the CM RF tower functionality. 12V levels work for sure. It does also work with the RS232 “tolerated” voltages. All RTS/DSR supporting USB adapters I have, work with the CM tower. Maybe I am lucky. But they don't do the 12V range; some are at 9ish V, others even down to 5ish V, and they all work with the RF tower. But they need to be there. This is not a SW issue, this is a USB2Ser HW adapter issue. Again, as far as I know, which does not mean much. When back at home (in one week), I can break out all CM related HW stuff; for now I am celebrating Easter + one week of garden work at my mother's in law place, with a good part of the family. All the best and Happy Easter to y'all Thorsten Edited Saturday at 09:04 PM by Toastie Quote
Wapata Posted Saturday at 08:43 PM Posted Saturday at 08:43 PM You know, I think I do not say "thanks" enough... Everyone does such a great job, write so well, so easily comprehensive for everyone... I'm happy to be here Quote
Toastie Posted Saturday at 09:02 PM Posted Saturday at 09:02 PM 14 minutes ago, Wapata said: I'm happy to be here Hey, guess what: I joined EB in 2010 - and never ever "regretted" or "forgot" about it. In total contrast This is the only LEGO "place" I am "on" - it is so comprehensive, educated, friendly, and - by any means - very nicely moderated world. I'm happy to be here as well! All the best Thorsten Quote
evank Posted Saturday at 09:13 PM Posted Saturday at 09:13 PM 7 minutes ago, Toastie said: Hey, guess what: I joined EB in 2010 - and never ever "regretted" or "forgot" about it. In total contrast This is the only LEGO "place" I am "on" - it is so comprehensive, educated, friendly, and - by any means - very nicely moderated world. I'm happy to be here as well! All the best Thorsten Same! This is probably true for all of EuroBricks, but even just in this little vintage Lego robotics community, we've got active participants from around the world -- sorry, flat-earthers ;) -- happily tinkering together. My door is open in New Jersey for anyone to visit and see some awesome Interface A models. Quote
Bliss Posted Saturday at 09:40 PM Author Posted Saturday at 09:40 PM (edited) @Wapata, @Toastie I tried to add a small pencil to change the button text to make it more meaningful... I did not expect this to be so difficult... I asked Copilot and he made me turn around and changed the code dozens of time... But finally I think it is working, not perfect, but that's going to be it for now ;-) EDIT: i found out that the edited button text is not saved when we save the program to a json file... EDIT #2: Now the button text is saved correctly. And thank you very much @Toastie for the detailed responses. I might eventually try to add support for the CM... I will not be able to test though. I'll let you know guys... I have few things on my todo list I would like to clear up first... Edited yesterday at 02:58 AM by Bliss Quote
Wapata Posted yesterday at 06:36 AM Posted yesterday at 06:36 AM It's true that because of us you do a lot of work : your to do list is clear enough ? Did you already make everything you wanted at first ? Quote
Bliss Posted 18 hours ago Author Posted 18 hours ago I added a Value Changed? block that returns true if the value changed since last scan of this block. Returns False otherwise. The input can be of any type, number, boolean, text. In theory, You can connect an expression in the te input like a math expression. So it is like a one shot raising and falling all in one block. In the following example, the LegoB1 touch input (Boolean) is connected to the Value Changed. So when I press the Touch sensor, the motor change its direction and it prints "true". When I release the touch sensor, the motor change its direction again and it prints "false" in the status log. If I would have connected the LegoB1 Inpt 1 ON directly to the IF without the Value changed, it would prints continuously true and motor would change direction at every scan of the loop only when I press the touch sensor... Quote
Bliss Posted 17 hours ago Author Posted 17 hours ago (edited) In the Lego Blockly app, it was possible to click the Run button again while the program was already running... Which allowed to Run multiple instances of the same program which was generating strange behaviours... So now, in the latest version, we can RUN only one instance at a time. Also, the Run button becomes green while the program is running. For the Interactive Button Block, when a program runs with this block, the first time we click on the button, it actually takes 2 clicks to execute the actions... But after the first use, it needs one click. Copilote cannot find the fix for this and I don't want to go through dozens of iteration with him for such a minor issue. At least not now... I re-organized the Control category. Version: 2026-04-05-1152 Edited 16 hours ago by Bliss Quote
Toastie Posted 11 hours ago Posted 11 hours ago (edited) @Bliss EDIT: I am sorry: This is about asking, not criticizing AT ALL. I believe that the introduction of "tasks" for 9751 will really elevate this Interface to next level. The family is watching Easter movies, I am tinkering with Blockly code What I tried was to have a loop doing flashing and a task interacting with me by "clicking": For some reason, it does not work, i.e. none of the outputs are activated. When trashing the task Flash B, the main loop works fine at 2 Hz. When trashing the main loop, and just starting the task "Flash B", clicking on the "when ..." works fine. I did close the Blockly app, and also rebooted my computer ... what am I doing wrong? All the best, Thorsten P.S.: I believe it is way easier for you, if I upload the .json files to Bricksafe for you to download, is that correct? Given, that I made not totally stupid mistakes? Edited 11 hours ago by Toastie Quote
Bliss Posted 10 hours ago Author Posted 10 hours ago @Toastie I did some tests and it seems that it does not like "spaces" in the Task names... I will try to do something to prevent this. (maybe replace the space with "_" automatically? I don't know yet but I come back with something) For now avoid using space in your task name. Also, when you thing there is a bug, you should check chrome debug window by pressing F12 or ctrl-shift-i. It can help diagnoze... at least for me :-) Quote
Toastie Posted 10 hours ago Posted 10 hours ago (edited) 51 minutes ago, Bliss said: I will try to do something to prevent this. (maybe replace the space with "_" automatically? I don't know yet but I come back with something) EDIT: Of course it works without spaces in the task name ... as @Bliss said! Honestly? I believe that "automatic" is not required at all. Every programming language has its rules. This is the thing: C wants ";" LEGO Blockly wants "no space in task declarations". And that is a >rule<. Over and out! I also believe that coming up with some sort of “manual” or “rules assembly” will >eventually< (not now, your code is evolving!) will make the difference. I also believe that such “manuals”, once the software is in a "mature" state (with every reason for further updates!), make the difference. Furthermore, I am very happy to volunteer when it comes to "manual creation". Your software is, at least as I see it, revolutionary. I don't know, others may feel differently, but when I assemble LEGO Blockly programs for 9751 - it just flows. And as far as I am immersed in this, entirely aligned with the vision of Seymore Papert. And I also believe there will be more (there always is ...) 9750 ... RCX, CM ... All the best, Thorsten Edited 10 hours ago by Toastie Quote
Bliss Posted 9 hours ago Author Posted 9 hours ago (edited) @Toastie, You can try with spaces in task names in the new version :-) (The generated JavaScript code has now "sanitized" task name. By the way, you can see the generated js code on the chrome console window when you press RUN) You should try the Named Timers... They act like a task somehow. So it does not block the rest of your code in the same loop. So in the following example, The Click me button in task 1 remains very responsive for reversing output B even if the same task is also flashing Output A. Using wait or sleep would block the code until the wait delay is done thus enabling the check of the button every .5 sec or 1 sec if using two wait 0.5s... Edited 9 hours ago by Bliss Quote
Toastie Posted 42 minutes ago Posted 42 minutes ago @Bliss this is simply beautiful !!! All the best Thorsten Quote
Gunners TekZone Posted just now Posted just now (edited) On 4/3/2026 at 6:29 AM, Bliss said: I will use the LVL1 arduino sketch with a small modif to make it faster and I will not implement any output status for a first draft. If it is really needed, I could put some effort to implement this in the future. Well, here I return... Quite behind the curve as usual... Requiring a bunch of reading to explain why I now see a Connect Int.A button on Blockly Anyhow, I had put together the LVL1 Arduino MEGO/Display option as I had the parts. So far I have been lazy and not weired up the cable to plug in my actual Int-A, But I was curious if the MEGA would also wok with Blockly. I adjusted the BAUD rate to 192000 and added in the if (Serial.available()) loop... Now I realised this is probably not enough, but I wanted to see if Blocky would at least connect to the MEGA. Nope. Not at all. Oh well, it is never that simple. And I since realised that the UNO setup and MEGA setup use different pins (referencing the "Int-A"). Figuring out how to make the MEGA not only control the real Int-A, but also be controlled as an Int-A via Blockly, will probably only take me another few months/years to figure out... (preferably with bidirectional passthrough between Blockly and the real Int-A, thus making the MEGA & Display act as both a controller and/or virtual Int-A option). OR... I guess I will just make an UNO set up so I can at least test your Blockly Int-A option. Edited just now by Gunners TekZone Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.