Jump to content

Recommended Posts

Posted (edited)

I can easily use hub motors using virtual joypads, however nothing happens when I replace the joypad blocks with remote control blocks. How do I go about it? I want the motors to run as long as a button is held, just like it works with the joypads.

Edited by MTBRICKS
  • 3 weeks later...
Posted
On 12/7/2025 at 11:44 AM, MTBRICKS said:

I can easily use hub motors using virtual joypads,

What kind of hub and program do you use?

Posted
25 minutes ago, Lok24 said:

What kind of hub and program do you use?

Lego Move Hub, the big one with 2 motors and the official PoweredUp app.

Posted (edited)

I see.

Here is a very simple approach:

Hub%20with%20remote2.jpg

The two motor blocks on the right set speed to 50 (upper) resp 0 (lower).

The "remote-icon"-block most left equals 1, what means the "+" button.
And the block below points to HUB2 (which is the remote) / Button-Set  B.

So you have to connect the hub as 01 and the remote as 02

Duplicate all and change the remote port  and motor port for second motor.

 

Edited by Lok24
Posted
3 hours ago, Lok24 said:

Here is a very simple approach:

Looks like rocket science to me, but I will give it a go for sure. Thanks a lot.

Posted
11 hours ago, MTBRICKS said:

Looks like rocket science to me,

:sweet:

I thought you were familiar with the Power App and use it already.

But feel free to ask, if something doesn't work as expected..

Posted (edited)
35 minutes ago, Lok24 said:

:sweet:

I thought you were familiar with the Power App and use it already.

But feel free to ask, if something doesn't work as expected..

Im familiar with the app in the way that people give me instructions and I copy them lmao. The app is so user unfriendly I cant get anything done. Literally zero explanation of anything in there, just pictures that dont tell me anything. I had to find block descriptions online just to know what the hell the blocks even do. It feels so much better using grown-up programming software that actually tells you what it does :D.

Anyway, back to the point, so far the code you provided only powers the motor when I press the play button and nothing reacts to any remote input whatsoever. Also, theoretically speaking, will this ensure
a smooth motor control or are we just doing a +50 -50 kind of thing?

Edited by MTBRICKS
Posted
3 minutes ago, vascolp said:

Haver a look at  Pybricks

Documented, able to python code programming or block programming...

 

Yeah I heard about it, it allows some new features too, like connecting the PS4 controller and stuff. I remember there being something I had to do first to make it work and I didnt want to bother with that yet. I will definitely give it a try in the future tho.

Posted (edited)
1 hour ago, MTBRICKS said:

The app is so user unfriendly I cant get anything done. Literally zero explanation of anything in there, just pictures that dont tell me anything.

I find it very user friendly, it is designed to be used by children, experimenting with it. As with a age of 6 years they could't read any explanations.
There was the Boost Set (17101) with over 60 "lessons" to learn it.
The explanation is done by the colors/topics of the blocks, and the symbols.
 

1 hour ago, MTBRICKS said:

so far the code you provided only powers the motor when I press the play button

Yes, I thought that was the requirement

On 12/7/2025 at 11:44 AM, MTBRICKS said:

I want the motors to run as long as a button is held,

 

1 hour ago, MTBRICKS said:

Also, theoretically speaking, will this ensure
a smooth motor control

Yes, of course, but with a different program.

Sorry that my example wasn't helpful.

 

Edited by Lok24
Posted

 

1 hour ago, Lok24 said:

I find it very user friendly, it is designed to be used by children, experimenting with it.

I have thought about this several times and I cant imagine how a child could do anything worthwile with this user interface. You would literally have to use all the blocks in all the variations which could take hundreds of hours just to see what they do. A lot of wasted time for no reason. I hate just thinking about it. Lets move on.

1 hour ago, Lok24 said:

Sorry that my example wasn't helpful.

Ah so I wasnt stupid after all. Or at least not that stupid. As a sidenote, why did you include the remote control block in the code when it does nothing and only the play button does things? Is it supposed to work or not?

Posted (edited)
47 minutes ago, MTBRICKS said:

You would literally have to use all the blocks in all the variations which could take hundreds of hours just to see what they do.

No, you can easily reduce the number of shown icons für beginners. Look at the "settings". 
The children I played with on many exhibitions were between say 4 to 8 years , and all of then could move "Vernie" from the boost set within few (less then three) minutes (Boost-app, which has slightly different blocks)

47 minutes ago, MTBRICKS said:

As a sidenote, why did you include the remote control block in the code when it does nothing and only the play button does things? Is it supposed to work or not?

 it detects the button pressed an delivers the value to the "compare" block, and if it equals "1" then motor start. There are other values, you can see then when selecting the right "value" field" 

You can see this easily, if have you use program with only the one(!) remote control block and press a button. 

47 minutes ago, MTBRICKS said:

Is it supposed to work or not?

I think yes, here when I press the B+ button  the motor runs.

When remote is connected as HUB 02.

Edited by Lok24
Posted
4 hours ago, Lok24 said:

I think yes, here when I press the B+ button  the motor runs.

When remote is connected as HUB 02.

This is some high level sorcery. Ima check it out later and see what went wrong in there. Its always the little things that screw up the entire thing.

Posted
20 hours ago, Lok24 said:

I think yes, here when I press the B+ button  the motor runs.

When remote is connected as HUB 02.

So I did a thorough examination and there really was a mistake in my code. That infinite loop thingy was added to the end of the sequence rather than combined with the middle part of the code and also for some reason I had to change hub 1 to hub 2, even though I connected the hub first and only then connected the remote. In any case, its working now, so many thanks my dude.

Posted
15 hours ago, MTBRICKS said:

This is some high level sorcery.

??

You first connect the Move Hub to the app. This is Hub 01.

Then you connect the remote to the app. This is Hub 02.

That should be shown in the list of connections.

And this the reason why have to set the value to "2" in the Hub-Selection-block (bottom left, the Icon with the two hubs)

BTW: why don't you connect the remote directly  to the Hub, without any app?

Posted (edited)
16 minutes ago, Lok24 said:

??

You first connect the Move Hub to the app. This is Hub 01.

Then you connect the remote to the app. This is Hub 02.

That should be shown in the list of connections.

And this the reason why have to set the value to "2" in the Hub-Selection-block (bottom left, the Icon with the two hubs)

BTW: why don't you connect the remote directly  to the Hub, without any app?

But I did connect the hub first and remote second, it doesnt even work any other way. Thats why I was surprised setting it to hub 2 worked when its actually hub 1. I really have no idea why. And how do you connect the remote to the hub without the app? Im pretty sure I tried it when I got it but since I have given up, there must have been something not working for me.

EDIT: Ive just tried connecting the remote to the hub without the app, it doesnt work at all. And when I use the app to connect the hub and then try to connect the remote without the app, it doesnt work either. So for me the app is the only way it seems.

Edited by MTBRICKS
Posted
17 minutes ago, MTBRICKS said:

I really have no idea why. And how do you connect the remote to the hub without the app?

Press green button on the Move Hub, the press green button on the remote. No smartdevice required.

Posted
8 minutes ago, Lok24 said:

Press green button on the Move Hub, the press green button on the remote. No smartdevice required.

But thats what Im doing. Every time I do this both things start flashing white light and then the light stops completely.

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