AJB2K3
Eurobricks Citizen-
Posts
106 -
Joined
-
Last visited
Content Type
Profiles
Forums
Gallery
Everything posted by AJB2K3
-
This Is the problems I found with my cross platform offline version. Trying to build the online version ment rolling out webusb which has its issues. @Bliss Thats why I chose to only open the port when running code otherwise you get access blocks/crashes. As bliss once said, my version is a dependency nightmare as its built for python and trying to find and install the correct dependencies in a pain and only getting worse as I add more function. In order to access the devices I am using both pyserial to access devices using a USB adapter but then have to use a the low level pyusb to access devices using PID and VID USB devices as they don't have working USB drives. A point of note about the Wedo1.0 hub - Apparently it doesn't act as a typical serial device but instead acts as a USB HID device. Even with the dependencies and knowledge I still cant get the USB tower to operate.
-
https://github.com/Ajb2k3/ULI This is my offline version and so far I have 2 interface B, 1 RCX and WeDo 1.0 all operating from the same program. This unfortunately (I have just learned) uses Blocking commands which cause delays in the response of the program and the Interface B. I'm looking to implement non blocking asynchronous code but my brain has stopped braining. A broker is a light weight software that just receives and transmits messages between devices. It doesn't act on the message just sends them on. I still have to suss out implementing the Cybermaster, spybot and others but apparently with spybot then you get PF.
-
That’s why I went off line as I had issue with web serial blocking the port, worst case I had was having to hard reboot the computer to reset the serial bus. it’s not just my own version but had the same with other software that accesses the bus like arduino, thonny and python if the bus connection isn’t force closed then a hard reset of the host machine is the only way, removing and reinserting usb devices doesn’t work i have had this with esp32 verities
-
I wish I could understand bit masking because in my blockly it reads once then show the same value but in raw python it shows the changes in value. I got a second interface now just no mains to plug it in! Edit: Solved it, AI slop strikes again, There was some random code that was added by Gemini that was braking the sensor read but not just that, I defined the wrong port numbers!
-
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.