AJB2K3 Posted Wednesday at 07:27 PM Posted Wednesday at 07:27 PM (edited) Something in windows 11 is not happy with it Ignore the blockly workspace lines as that an internal warning for the upgrade of blockly source. Are you running from the command line or clicking on main.py? I'm going to need time to look into this as it is specific to windows 11 and I don't have a machine to test. Can you open a bug report on GitHub with the info so I dont forget please? Edited Wednesday at 07:35 PM by AJB2K3 Quote
Bliss Posted Wednesday at 10:09 PM Author Posted Wednesday at 10:09 PM 2 hours ago, AJB2K3 said: Are you running from the command line or clicking on main.py? A cmd window and I use: Python3 main.py Quote
AJB2K3 Posted Thursday at 06:10 PM Posted Thursday at 06:10 PM Thanks and sorry.The GitHub was missing the files Quote
Bliss Posted Friday at 12:59 AM Author Posted Friday at 12:59 AM Thanks @AJB2K3, I just tested with the Lego Interface B, not the RCX and it is connecting, and I used the motor A forward and it is working. But the whole interface B stops by itself after few seconds. I guess you did not implement yet the Keep Alive... It looks promising. Needs more function blocks like timers etc. Quote
AJB2K3 Posted Friday at 06:59 PM Posted Friday at 06:59 PM Added loads more blocks now including the Keepalive. Quote
Toastie Posted Friday at 09:24 PM Posted Friday at 09:24 PM I am totally lost And this is due to my lack of knowing anything about Python (well sort of, I guess, I get the Python idea, have it installed, but whatever I try, it tells me I am dumb) but certainly because I simply can't follow the libraries, includes, and whatnot required for getting this up and running. Rock on dudes, I revert to QBasic/DOS3.3/DOSBox-X. Have fun and make it happen! All the best Thorsten Quote
Bliss Posted Saturday at 02:29 AM Author Posted Saturday at 02:29 AM @Toastie, I'm a very persitant person and before I abandon a project, it takes a lot and I admit that @AJB2K3 solution is not obvious to install. I kept going because I have spare time these days. There are lot of dependencies Python, QT6, Node.js etc... Not for the faint of heart. But it's in early development so I don't know. And maybe an install pkg or executable (.exe) may be done out of this? Because for now, it's not easy to implement. Blocky programming is easy to learn, cause it's visual, but if you want to make a serious project with many Interface B, it can become ugly. I still believe that Direct Python with LegoB and LegoRcx Module is the easiest. But I saw the JavaScript project of a Member in the Lego ControlLab thread and I thought that it could be intersting to have an IDE to program Lego Bricks directly from a website, with NO Install required. Well, you still need a PC, Serial Adapter, and... Internet (Chrome or Edge only). So I thought it might be possible to integrate Lego Int B to known online Blocky alike tools like Scratch, Microbit, Snap!, MBot... But after evaluating and even tried with Snap!, I abandonned and started my own web based blockly project. I hope to be able to present a draft very soon. I'll need some beta tester ;-) Since I have only one RCX, and one Lego Interface B. (It supposed to be Multi interface). At the moment, the communication with continuous reading of the 19 bytes packets runs well from the browser javascript but I don't know how it is going to be with multiple interfaces... Quote
Gunners TekZone Posted Saturday at 02:39 AM Posted Saturday at 02:39 AM 2 minutes ago, Bliss said: I'll need some beta tester ;-) Since I have only one RCX, and one Lego Interface B. (It supposed to be Multi interface). At the moment, the communication with continuous reading of the 19 bytes packets runs well from the browser javascript but I don't know how it is going to be with multiple interfaces... Sign me up, again... I can pull in three (3) Interface-B's and... well... perhaps scrounge up an RCX or two Quote
AJB2K3 Posted Saturday at 07:01 AM Posted Saturday at 07:01 AM (edited) 4 hours ago, Bliss said: @Toastie, I'm a very persitant person and before I abandon a project, it takes a lot and I admit that @AJB2K3 solution is not obvious to install. I kept going because I have spare time these days. There are lot of dependencies Python, QT6, Node.js etc... Not for the faint of heart. But it's in early development so I don't know. And maybe an install pkg or executable (.exe) may be done out of this? Because for now, it's not easy to implement. Blocky programming is easy to learn, cause it's visual, but if you want to make a serious project with many Interface B, it can become ugly. I still believe that Direct Python with LegoB and LegoRcx Module is the easiest. But I saw the JavaScript project of a Member in the Lego ControlLab thread and I thought that it could be intersting to have an IDE to program Lego Bricks directly from a website, with NO Install required. Well, you still need a PC, Serial Adapter, and... Internet (Chrome or Edge only). So I thought it might be possible to integrate Lego Int B to known online Blocky alike tools like Scratch, Microbit, Snap!, MBot... But after evaluating and even tried with Snap!, I abandonned and started my own web based blockly project. I hope to be able to present a draft very soon. I'll need some beta tester ;-) Since I have only one RCX, and one Lego Interface B. (It supposed to be Multi interface). At the moment, the communication with continuous reading of the 19 bytes packets runs well from the browser javascript but I don't know how it is going to be with multiple interfaces... Thanks @Bliss Yes installation is a pain and yes I would like to have a windows installer but again I don't have a Win11 computer so can only develop installers for OSX and Debian/raspbian. An online version is complicated because of web hosting and then having to have a browser that supports web serial which is still not perfect and only supported fully by chrome. The problem is that a computer will still need the dependencies. You can create a fork of mine if you want As to the reading of the bytes, no that is a problem I am working on with the Ifaces function. The function is support to allow the setting of a device name and the attachment of the port so in the case of your RCX code it supposed to change the line r=RCX("COM4") to IFACE_1=INTB("comport for INterfaceB_1") IFACE_2=RCX("comport for RCX1") and then you should be able to to type IFACE_1.write() IFACE_2.mot() The blocks would then have a dropdown list of the currently configured interfaces to select from. problem is that I have been working on this after work and my brain has stopped braining. Please keep testing and complaining. @Gunners TekZone You images arn't working. 9 hours ago, Toastie said: I am totally lost And this is due to my lack of knowing anything about Python (well sort of, I guess, I get the Python idea, have it installed, but whatever I try, it tells me I am dumb) but certainly because I simply can't follow the libraries, includes, and whatnot required for getting this up and running. Rock on dudes, I revert to QBasic/DOS3.3/DOSBox-X. Have fun and make it happen! All the best Thorsten No you are not lost. If you have a uptodate Debian/raspbian computer there is an installer to sort out things. I still have to sort out a windows and OSX installer. Edited Saturday at 07:02 AM by AJB2K3 Quote
Gunners TekZone Posted Saturday at 07:14 AM Posted Saturday at 07:14 AM (edited) 18 minutes ago, AJB2K3 said: You images arn't working. Oh, you are referring to my pictures? Is that what you meant before? I was somehow thinking that was relating to program image links of Bliss's stuff that I might have reposted. I don't tend to leave everything I post sitting there forever. I ramble and most is not relevant to the topic. And sometimes I overshare so purge happens . However, as far as I am aware, all my recent photos posted here are still active public links (I use the free dropbox, so older stuff will eventually be removed due limited space... But I do try to clean up the dead links in those cases). And if the link was dead that would affect me as well, but I can still see them. Edited Saturday at 07:21 AM by Gunners TekZone Quote
AJB2K3 Posted Saturday at 08:25 AM Posted Saturday at 08:25 AM (edited) 1 hour ago, Gunners TekZone said: Oh, you are referring to my pictures? Is that what you meant before? I was somehow thinking that was relating to program image links of Bliss's stuff that I might have reposted. I don't tend to leave everything I post sitting there forever. I ramble and most is not relevant to the topic. And sometimes I overshare so purge happens . However, as far as I am aware, all my recent photos posted here are still active public links (I use the free dropbox, so older stuff will eventually be removed due limited space... But I do try to clean up the dead links in those cases). And if the link was dead that would affect me as well, but I can still see them. The one you posted 5 hours ago is not showing Edited Saturday at 08:26 AM by AJB2K3 Quote
Gunners TekZone Posted Saturday at 08:31 AM Posted Saturday at 08:31 AM (edited) 10 minutes ago, AJB2K3 said: The one you posted 5 hours ago is not showing I don't know what to say or do... The link is valid as far as I can tell. Nothing spectacular anyhow... Just a box of 11 LEGO RCX bricks, and a few other bits and bobs. I have a 12th that is "thinner" as in no battery box, just a plate built base and with wired connections for both power and optional external audio. It just sits on my desk for experimenting with. I'd post a pic... But... Edited Saturday at 08:36 AM by Gunners TekZone Quote
Gunners TekZone Posted Saturday at 10:41 AM Posted Saturday at 10:41 AM (edited) Ya... I was silly and purchased a big batch of Mindstorms LEGO about 3-4 years ago. Parts, books, software, the RCX Bricks, a couple of blue scout bricks, some trans-blue lidded thing with a couple of built in motors, and a wider old-grey model also with a couple of built in motors. But I never really found a use for them. But getting a bunch of them to act under remote control from a Python controler sounds like fun. I did experiment a bit doing such, using my bench RCX and the code that Bliss had made about a year ago. Edited Saturday at 10:47 AM by Gunners TekZone Quote
AJB2K3 Posted Saturday at 11:41 AM Posted Saturday at 11:41 AM Ok had to download the image to view it but I see a speed computer (little yellow and gray thing with pulley wheels. but the bigger wider thing is the bionic manas which runs on the PF/Spybot IR system. Quote
AJB2K3 Posted Saturday at 01:57 PM Posted Saturday at 01:57 PM Added the function to use multiple RCX's but via multiple towers. Quote
Toastie Posted Saturday at 08:06 PM Posted Saturday at 08:06 PM (edited) 9 hours ago, AJB2K3 said: 12? Ha! Time to brag :D I have 11 1.0's Of which are 8 in service: 3 serve 18 switch points on my train layout (using mechanical multiplexers), 2 manage some lights, 1 operates a bridge (otherwise I can't get into a storage room up here) and 2 operate - well - 2 trains (these are post-PUp PID (or PPP) speed controlled trains ;) There is also 1 Scout operating 6 MicroScouts (via optical fibers) operating 6 additional switch points and another Scout operating 3 MicroScouts (again via optical fibers) operating 3 more switch points. It takes about half an hour to switch all these PBricks on :D They are all equipped with NiMH batteries and pickup power from the 9V track, which is permanently powered with a 15V DC laptop power supply. Which in turn means that I don't have to replace batteries every so many months Control is via Laptop/VB6 (yes, VB6 ) and MulPI, which among other things uses the plain vanilla RCX messaging protocol to send out - well messages to the Scouts and RCX' using simple 433 MHz OOK transceivers I made. MulPI also uses the PowerFunctions and PoweredUp communication channels (it has an ESP32 Vroom board under the hood - these are simply >crazy<. And already soo old ;) And just for fun, I can also control the lights up here as they are controlled by InterTechno 433 MHz wireless switches, which were hip after WW2 - no - it was after Y2k. 9 hours ago, Gunners TekZone said: some trans-blue lidded thing with a couple of built in motors, and a wider old-grey model also with a couple of built in motors. But I never really found a use for them. Trans-blue = Spybots, old-grey = Cybermasters - they are all very handsome and readily programmable with NQC or more comfortably with BricxCC, which uses NQC. I also have a couple of those beauties. And you can get them for cheap - I guess, because documentation back then was no so enlightening ;) and they are sort of limited in general usage due to their built-in motors. Autonomous robots were meant to be powered by them. But: I will find duties for these as well. I just need more time. Less than 3 years and I'll be on permanent vacation Y'all have fun! Best Thorsten Edited Saturday at 08:09 PM by Toastie Quote
AJB2K3 Posted yesterday at 08:36 AM Posted yesterday at 08:36 AM I've created a win11 installer but need someone to check its not doing anything bad please. Quote
AJB2K3 Posted yesterday at 01:49 PM Posted yesterday at 01:49 PM my interfaceB code is doing random things at the moment so having a play with yours @Bliss I cant get inputs to read using from legob import LegoB import time Lego1 = LegoB('/dev/cu.PL2303G-USBtoUART2420') time.sleep(1) Lego1.inp(1).val time.sleep(1) Lego1.close() I do get the conformation and the close messages. Quote
Bliss Posted 23 hours ago Author Posted 23 hours ago (edited) @AJB2K3, Did you try: print(Lego1.inp(1).val ) ? Edited 23 hours ago by Bliss Quote
AJB2K3 Posted 23 hours ago Posted 23 hours ago um no, I was following your instructions and thought it was a command! Quote
Bliss Posted 22 hours ago Author Posted 22 hours ago (edited) In Thonny, throwing your four lines in one shot will work. But in windows command prompt, Python3 command to enter the Python prompt, if I do the same, those four line all together, it will not show the inp(1).val. But executing one line at a time will. Inp(x).yyy are properties... Not methods. I just happened to try python command prompt in a DOS window for the first time lol. Always used the prompt in Thonny directly. In Thonny, I can see that it is using Python 3.10 by default. In the Command Window, it's Python 3,14 and I see that it does not behave exactly the same. The .close() method does not seem to close everything properly. I'm goint to have a look to this and update... EDIT: Finally I just removed the __del__ method in legob.py... I updated in dropbox and github. Edited 21 hours ago by Bliss Quote
AJB2K3 Posted 12 hours ago Posted 12 hours ago 10 hours ago, Bliss said: In Thonny, throwing your four lines in one shot will work. But in windows command prompt, Python3 command to enter the Python prompt, if I do the same, those four line all together, it will not show the inp(1).val. But executing one line at a time will. Inp(x).yyy are properties... Not methods. I just happened to try python command prompt in a DOS window for the first time lol. Always used the prompt in Thonny directly. In Thonny, I can see that it is using Python 3.10 by default. In the Command Window, it's Python 3,14 and I see that it does not behave exactly the same. The .close() method does not seem to close everything properly. I'm goint to have a look to this and update... EDIT: Finally I just removed the __del__ method in legob.py... I updated in dropbox and github. I was using idle from 3.14.7 but it was user error in my case as I forgot that the inp were request functions not command functions. I have an oddity with my code that in IDLE and Thonny the buffer get cleared and I can see changes in inputs but my IDE doesn't always register the changes to inputs. 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.