Jump to content
THIS IS THE TEST SITE OF EUROBRICKS! ×
THIS IS THE TEST SITE OF EUROBRICKS!

Recommended Posts

Posted (edited)

Hi everybody!

I present to you Remote Bla Bla.

Remote Bla Bla is a Pybricks (https://pybricks.com) program for a LEGO PoweredUp TechnicHub and a LEGO PoweredUp Remote Control where you first define how each device answers to remote control button actions (config mode) and then you play with your MOC/Set using the defined configuration (play mode).

The configuration is saved so that you can turn off the hub, change batteries if needed, go back to your hub and everything is there. Just play. If the configuration is not what you want, you can go back to config mode and reconfigure the behavior.

Keep in mind that this is a computer with an input device of 7 buttons and an output device of just two LEDs. This is a Star Trek like interface, a real YDSWIG interface: you don't see what you get. However, once you learn it, you will notice that it is simple.

No screens attached!

It is working with the latest release of pybricks (v3.1.0).

Documentation here. Get it from here.

Example usage video:

 

Zetros controlled by Remote Bla Bla:

Hope you like it, tell me what you fill about it.
I will try to publish some usage examples later.

PS: this is a pure software MOC, maybe it should be in the LEGO Mindstorms and Robotics Forum... but I have the feeling that most interested people are here in LEGO Technic Forum. Admins, tell me what you think.

VascoLP

Edited by vascolp
Fixed documentation link (thanks @GerritvdG!); added videos
Posted

Wow, that is really a very fine piece of work!!! This should get more folks interested in PUp and its capabilities!

Note: Your "Documentation" link points to this thread; on the other hand, the documentation PDF is also available in the GiHub project folder.

All the best,

Thorsten

Posted

Wow, very nice! I'll have to build something to test it out! Perfect timing for the current contest too, as it would make controlling the vehicles easier with the remote rather than smartphone.

Does it also work with the RI hub?

Posted
1 hour ago, howitzer said:

Does it also work with the RI hub?

Well... I don´t have an RI hub, the code has an hardcoded reference to TechnicHb object (easely changeable, as can be seen in Remote City Bla) and supports only 4 ports.
Anyway, it should be a very good starting point, specially if you stick with 4 ports only.

Also, 4 ports in the remote already requires some finger skills, I don´t know exactly how one would manage six ports! :classic:...

Posted
1 hour ago, vascolp said:

Well... I don´t have an RI hub, the code has an hardcoded reference to TechnicHb object (easely changeable, as can be seen in Remote City Bla) and supports only 4 ports.
Anyway, it should be a very good starting point, specially if you stick with 4 ports only.

Also, 4 ports in the remote already requires some finger skills, I don´t know exactly how one would manage six ports! :classic:...

Well, you could also have sensors or hard-coupled motors in the extra ports, which means that the code still has to support those, even if the remote doesn't.

Anyway, thanks for the info, maybe I'll try to tinker with it myself at some point!

Posted

Moving from 4 to 6 ports is not really difficult in terms of program structure... The problem is mainly in parameter saving.... I use the remote name to save persistent data because technic hub has nothing to do it...and it's only 14 characters...

Feel free to ask!

 

Posted (edited)

very nice, thanks! tested it with my CAT Bulldozer.

I Hope Pybricks also supports other BLE (Bluetooth Low Energie) controllers in the future, for example the Xbox Series Controller with proportional control

 

Edited by Al Ex
Posted
5 hours ago, Al Ex said:

very nice, thanks! tested it with my CAT Bulldozer.

I Hope Pybricks also supports other BLE (Bluetooth Low Energie) controllers in the future, for example the Xbox Series Controller with proportional control

 

Cool! Thank you for testing it! Was documentation clear enough?

Posted
9 hours ago, vascolp said:

Cool! Thank you for testing it! Was documentation clear enough?

yes, documentaion is clear enough, i printed out the 2 sites with BLA modes to have easy access at any time

  • 2 weeks later...
  • 1 month later...
Posted (edited)

Hi Everybody,

A new version of RemoteBlaBla was just released, release v1.00, here.
It now includes the following types of modes:

  • Power: modes that set electrical power on the motor. No sensors are used, so any motor can be used.
  • Speed: modes that use motor sensors to control speed. Speed is defined by the commands and the motor tries to follow the defined speed. 
  • Servo: modes that set 0 position and move 90º left or right, possibly with some steps.
  • Steering: modes thar use sensors to detect staling and define movements from one limit to the other, possibly stepped.
  • Stepper: modes designed to control gearboxes, mostly 90º steps gearboxes. Using absolute zero or finding gearbox limits.
  • Up Down: inspired by the Zetros differential lock command which uses a sensor less motor. Runs the motor in one direction for a given amount of time.

Also included is support for InventorHub and PrimeHub (6 motors but 4 commands only) but that remains to be tested, since I do not have any...

The most difficult thing was to squeeze all this stuff into CityHub's small memory...it was just this close to the memory limit of CityHub.

And here is a video of Zetros controlled by Remote Bla Bla:

Hope you enjoy it!
 

Edited by vascolp
typo
  • 6 months later...
Posted

I finally got around to trying out my new remote with this program, but there's one thing that's not making sense to me. I get it working, disconnected from my computer, but then if I shut off the hub and power it on again, I can't convince it to start running again unless I reconnect it to my laptop and rerun it. Is this the way it's supposed to be?

Thanks

Posted
12 hours ago, 2GodBDGlory said:

I finally got around to trying out my new remote with this program, but there's one thing that's not making sense to me. I get it working, disconnected from my computer, but then if I shut off the hub and power it on again, I can't convince it to start running again unless I reconnect it to my laptop and rerun it. Is this the way it's supposed to be?

Thanks

Did you install the firmware in your hub, including the program (RemoteBlaBla program)?

Posted

Took this from the manual, maybe it helps:

You can test Remote Bla Bla under the pybricks interface, but its true power happens when you include it in your TechnicHub firmware. By doing so, you will have a configurable standalone device which you can configure according to your needs.
Note: if you include Remote Bla Bla in your hub firmware, and turn off the hub completely (this is, no blinking lights) when you connect it back, you might need to click twice to start Remote Bla Bla. First click turns on pybricks, (blue blinking light), second click starts Remote Bla Bla (white blink light asking for remote).

Posted

Not quite... In the latest version: ('technichub', '3.2.0b4', 'v3.2.0b4 on 2022-10-21'), RemoteBlaBla needs a litle change... delete the following line (line 51 in RemoteBlaBla.py).

 from math import trunc

But then, it seems to work fine... although I have not done serious testing, just connected one motor... 

Posted (edited)

I've got an idea I'd be curious to know your opinion on, @vascolp

As you know, one of the main disadvantages of using this remote is that it gives up proportional control.

This can be pretty annoying for faster RC cars, where even just one intermediate step can make it a lot easier to keep a car on a straight line. Using the available buttons, I've come up with a physical controller that I think should be able to make for two-step proportional control. The idea is that a small press of the lever on the remote only pushes the LBG +/- button, while a harder press moves the lever further to additionally press the red button, so that both the +/- button and the red button are pressed. With this, the five positions would be: + and red (high power), + (low power), nothing (no power), - (low power, reverse), and - and red (high power, reverse).

Do you think this would be feasible on the programming side? I'm not sure if it would work for this project, given the storage limitations (especially on the City Hub), but I'm curious to know what you think.

Here's my physical remote:

800x600.jpg

With parts removed, three positions of the lever:

Spoiler

800x600.jpg

800x600.jpg

800x600.jpg

It seems to work nicely, but it had to be tuned very carefully, which resulted in two disadvantages:

1. I had to insert a 1x1 brick between the two arms with wheels to press them apart slightly, because the brick is a bit taller than a stud

2. I had to use a tire uncommonly used in Technic (Mine were from a Classic Space set, part 3641, which went out of production in 2014. There's a new version, 87414, which would likely work, but tolerances are tight here) installed on a 1x1 liftarm as a rim to get the exact right size I needed.

Perhaps someone can improve on this design!

Edited by 2GodBDGlory
Posted
6 hours ago, 2GodBDGlory said:

I've got an idea I'd be curious to know your opinion on,

 

Wow, thats a crazy idea!:sweet:

Actually it might work, it deppends a little on the quality of the input generated by your construct. If its really stable it shouldn't be very difficult!.

I could even imagine 3 steps ([Plus], [Plus,Red], [Red comming from plus side]...)

If I have some time I will try your idea... but I can´t promise any timings... 

Posted
6 hours ago, vascolp said:

Wow, thats a crazy idea!:sweet:

Actually it might work, it deppends a little on the quality of the input generated by your construct. If its really stable it shouldn't be very difficult!.

I could even imagine 3 steps ([Plus], [Plus,Red], [Red comming from plus side]...)

If I have some time I will try your idea... but I can´t promise any timings... 

Cool, thanks!

What do you mean by the quality of input? Is that just reliable button presses? I was just testing it with a standard profile, and the +/- buttons work very reliably. The red buttons also feel completely reliable, but I can't tell for sure, since they're not actually controlling anything.

That's a good point about doing the three steps! I may try designing a variant for that.

Posted

I don't have those tires with me at the moment so I tried with this.

Kinda works but...

I suspect the three steps will be a bit difficult, though...

Here is a simple test program. Just connect a motor to port A.

from pybricks.pupdevices import Motor, Remote
from pybricks.parameters import Port, Button
#from pybricks.tools import wait

m = Motor(Port.A)
print('connect remote...')
remote = Remote()

prev_pressed=()
while True:
    pressed = remote.buttons.pressed()

    if prev_pressed != pressed:
        print(pressed)
    prev_pressed=pressed
    if Button.LEFT_MINUS in pressed:
        if Button.LEFT in pressed:
            m.dc(100)
        else:  
            m.dc(50)
    elif Button.LEFT_PLUS in pressed:
        if Button.LEFT in pressed:
            m.dc(-100)
        else:  
            m.dc(-50)
    else:
        m.dc(0)

 

Posted

Cool, thanks!

It's working perfectly for me!

I was thinking it would even be theoretically possible to add more steps, like this:

1. Center

2. +

3. + and red

4. red (off of +)

5. - and red (off of red off of +)

6. - (off of red off of +)

It would take a more complicated controller, though, and the coding would become far more tricky than just adding that third step, so it might not be worth it.

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