vascolp Posted October 14, 2023 Posted October 14, 2023 On 10/14/2023 at 11:47 AM, Lok24 said: That's my favoured idea, yes Expand 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 On 10/14/2023 at 2:21 PM, 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. Expand That's the problem. I have routines in my program, which raise an event when time ist over On 10/14/2023 at 2:21 PM, vascolp said: I foresee lots of programming fun! Expand 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 On 10/15/2023 at 11:03 PM, legOtaku_official said: I was wondering if there is any example code for making the City Hub play a custom MP3? Expand Without any speaker? Suppose not. Quote
TekyTek Posted October 16, 2023 Posted October 16, 2023 On 10/16/2023 at 6:00 AM, Lok24 said: Without any speaker? Suppose not. Expand 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 On 2/12/2024 at 6:07 PM, Arlo said: Mainly, I want to find a hub that is rechargeable. Expand SPIKE/MINDSTORMS. Quote
Lok24 Posted February 12, 2024 Posted February 12, 2024 On 2/12/2024 at 6:07 PM, Arlo said: PUP hubs have been unavailable from Lego for awhile now. Expand 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
vladoniki Posted March 2 Posted March 2 I use Pybricks Profile for 42160 + Xbox controller. I tried to find a similar code for 42160 which uses the Force feedback of XBox controller. I'm not good at programming. If someone has a ready code for 42160 + Rumble function of the XBox controller I woud be very happy if you share it. Thanks! :) Quote
AVCampos Posted March 2 Posted March 2 What do you mean by "force feedback" in this context? Specifically, in what situations during driving would you like rumble to function? Quote
vladoniki Posted March 2 Posted March 2 On 3/2/2025 at 12:24 PM, AVCampos said: What do you mean by "force feedback" in this context? Specifically, in what situations during driving would you like rumble to function? Expand I guess it would be suitably to vibrate/rumble when it reaches an obstacle (front or rear motor reaches a higher load). Force feedback is familiar to me from PC steering wheels (with force feedback) - playing Need for Speed with it is very satisfying. I'm looking for a similar experience with 42160 + the XBox controller. :) Quote
Lok24 Posted March 4 Posted March 4 Hi all, I reported here my problem, that installing Pybricks firmware on MoveHub fails https://github.com/orgs/pybricks/discussions/2102 Is anybody here with the same problem or even a solution? Quote
letsbuild Posted May 3 Posted May 3 Hey everyone, I'm using Pybricks to control some trains and a crane, But I'm having issues using data. One example is that when I try to pull and use the data from a colour sensor (to get the raw values), I tells me that the data can't be read as null. I know that this problem can be resolved through typed python, but I use block-based python. I also encounter this issue when trying to send large numbers over bluetooth since I can't label it as integers. Does anyone know how to label data in block-based pybricks? I'm not a programmer, so I don't even know if I'm using the right words. Thanks in advance, letsbuild On 2/12/2024 at 6:07 PM, Arlo said: 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? Expand Also, I'm in the process of designing a rechargeable pack for my technic hubs. I don't know if I'll be able to sell commercially due to certification costs, but I plan on posting to EB if it works out. Quote
gyenesvi Posted May 4 Posted May 4 On 5/3/2025 at 8:40 PM, letsbuild said: Also, I'm in the process of designing a rechargeable pack for my technic hubs. I don't know if I'll be able to sell commercially due to certification costs, but I plan on posting to EB if it works out. Expand Something like this? Already available.. https://phondly.com/product/enbo-pu-battery-pack/ Quote
letsbuild Posted May 6 Posted May 6 On 5/4/2025 at 10:30 PM, gyenesvi said: Something like this? Already available.. https://phondly.com/product/enbo-pu-battery-pack/ Expand A lot like that, but I'll probably be closer to 20-30CAD in cost, not 120CAD, with 15Wh. I'm not expecting to compete with them, I just can't afford the price of their packs. 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.