Jump to content

Recommended Posts

Posted
  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!

Posted
  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 ..... ;-)

 

Posted
  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?

  • 3 months later...
Posted

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?  

Posted
  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..

 

Posted

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?

  • 6 months later...
Posted (edited)

Hi all,can't find ".append" to add elements to a listIs any special import required?

Thanks, found a solution.

Edited by Lok24
  • 6 months later...
Posted

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! :)

Posted

What do you mean by "force feedback" in this context? Specifically, in what situations during driving would you like rumble to function?

Posted
  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. :)

  • 1 month later...
Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...