vascolp Posted December 12, 2021 Posted December 12, 2021 (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 April 4, 2022 by vascolp Fixed documentation link (thanks @GerritvdG!); added videos Quote
Toastie Posted December 12, 2021 Posted December 12, 2021 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 Quote
howitzer Posted December 12, 2021 Posted December 12, 2021 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? Quote
vascolp Posted December 12, 2021 Author Posted December 12, 2021 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! ... Quote
howitzer Posted December 12, 2021 Posted December 12, 2021 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! ... 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! Quote
vascolp Posted December 12, 2021 Author Posted December 12, 2021 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! Quote
vascolp Posted February 3, 2022 Author Posted February 3, 2022 I everybody: At last, a simple video of Remote Bla Bla: Quote
Al Ex Posted February 7, 2022 Posted February 7, 2022 (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 February 7, 2022 by Al Ex Quote
vascolp Posted February 7, 2022 Author Posted February 7, 2022 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? Quote
Al Ex Posted February 7, 2022 Posted February 7, 2022 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 Quote
whitepen Posted February 22, 2022 Posted February 22, 2022 A little late to the party, but this is absolutely fantastic! It adds so much to PU! Quote
vascolp Posted February 22, 2022 Author Posted February 22, 2022 16 hours ago, whitepen said: A little late to the party, but this is absolutely fantastic! It adds so much to PU! Thank you! Quote
vascolp Posted April 4, 2022 Author Posted April 4, 2022 (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 April 4, 2022 by vascolp typo Quote
2GodBDGlory Posted October 22, 2022 Posted October 22, 2022 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 Quote
vascolp Posted October 23, 2022 Author Posted October 23, 2022 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)? Quote
vascolp Posted October 23, 2022 Author Posted October 23, 2022 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). Quote
2GodBDGlory Posted October 23, 2022 Posted October 23, 2022 Ok, thanks! No, I didn't realize that was a separate step, but I can try to figure it out now. Quote
Pybricks Posted October 27, 2022 Posted October 27, 2022 If you use the latest version via https://beta.pybricks.com/, the separate step to save your program is no longer required. Just run the program once and you're good to go! Quote
vascolp Posted October 27, 2022 Author Posted October 27, 2022 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... Quote
2GodBDGlory Posted October 30, 2022 Posted October 30, 2022 (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: With parts removed, three positions of the lever: Spoiler 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 October 30, 2022 by 2GodBDGlory Quote
vascolp Posted October 30, 2022 Author Posted October 30, 2022 6 hours ago, 2GodBDGlory said: I've got an idea I'd be curious to know your opinion on, Wow, thats a crazy idea! 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... Quote
2GodBDGlory Posted October 30, 2022 Posted October 30, 2022 6 hours ago, vascolp said: Wow, thats a crazy idea! 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. Quote
vascolp Posted October 30, 2022 Author Posted October 30, 2022 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) Quote
2GodBDGlory Posted October 30, 2022 Posted October 30, 2022 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. Quote
vascolp Posted October 30, 2022 Author Posted October 30, 2022 Very cool! I must get my old classic space tires.... or even older ones like these, they might work too: 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.