vascolp Posted October 14, 2023 Posted October 14, 2023 2 hours ago, Lok24 said: That's my favoured idea, yes Ok, maybe monitor it only when you press the remote button to change speed up. Have an array with the initial theoretical 100 speeds. When you press the remote button up, get speed before, get speed after, if difference is less than a given threshold you reached maximum load speed, so recalculate the array of speeds. Now this will only decrease speeds. We have to find a way to increase speeds, in case you decouple the wagons. Maybe, when you are in step 100, you allow for a 101 step which is current 100 speed plus the step speed… if speed increases above a threshold, recalculate with new maximum. Now this is all nice theory, but speed increases will take time, most probably much more than the time it takes to get speeds before and after… so the “get speed after” must be done with some sort of delay, which will have to be tuned somehow. Using a StopWatch object in the main loop might be a possible solution for this. I foresee lots of programming fun! Whatever you do, please tell us how it worked! Quote
Lok24 Posted October 14, 2023 Posted October 14, 2023 5 minutes ago, vascolp said: Now this is all nice theory, but speed increases will take time, most probably much more than the time it takes to get speeds before and after… so the “get speed after” must be done with some sort of delay, which will have to be tuned somehow. Using a StopWatch object in the main loop might be a possible solution for this. That's the problem. I have routines in my program, which raise an event when time ist over 6 minutes ago, vascolp said: I foresee lots of programming fun! Yes ..... ;-) Quote
legOtaku_official Posted October 15, 2023 Posted October 15, 2023 I was wondering if there is any example code for making the City Hub play a custom MP3? I was wondering about the feasibility of hacking the Lego Ideas Grand Piano. Quote
Lok24 Posted October 16, 2023 Posted October 16, 2023 6 hours ago, legOtaku_official said: I was wondering if there is any example code for making the City Hub play a custom MP3? Without any speaker? Suppose not. Quote
TekyTek Posted October 16, 2023 Posted October 16, 2023 2 hours ago, Lok24 said: Without any speaker? Suppose not. Could you have a sensor in a port detect a coloured tile and send a BLE signal to a laptop to play a sound, similar to BAP? Quote
Arlo Posted February 12, 2024 Posted February 12, 2024 Are there any 3rd party hubs that pybricks can work with? Mainly, I want to find a hub that is rechargeable. In stock would be cool too! PUP hubs have been unavailable from Lego for awhile now. Looks like we have Buwizz, PfBrick, and Sbrick Plus, but it seems that each one of those companies decided to come up with their own proprietary software for their hubs? Quote
AVCampos Posted February 12, 2024 Posted February 12, 2024 4 minutes ago, Arlo said: Mainly, I want to find a hub that is rechargeable. SPIKE/MINDSTORMS. Quote
Lok24 Posted February 12, 2024 Posted February 12, 2024 2 minutes ago, Arlo said: PUP hubs have been unavailable from Lego for awhile now. Yes, but on Bricklink they are always available, and much cheaper. Spike Hubs are rechargeable. For others I use rechargeable batteries, which are much easier to handle.. Quote
angryOne Posted February 14, 2024 Posted February 14, 2024 Hi, Is pybricks able to reliably drive two motors with mutually locked output shafts in closed loop modes (I am mostly interested in constant angular velocity)? Won't it cause oscillations in regulation loops? Has anybody tested it in application like RC car? Quote
Lok24 Posted August 24, 2024 Posted August 24, 2024 (edited) Hi all,can't find ".append" to add elements to a listIs any special import required? Thanks, found a solution. Edited August 26, 2024 by Lok24 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.