Recommended Posts

I agree that Pybricks has the large advantage of only requiring LEGO hardware (and allowing sweet stuff like auto-reversing the 42140's controls when it flips over), but, like you said, can't be used for proportional control. It also only works with PU, not PF, SBrick or BuWizz.

Share this post


Link to post
Share on other sites

So I have been trying to figure out which gamepads could possibly work with iPhone/iPad and are also easily accessible here, and I found the iPega 9129 that I like (for about $22). So I jumped on it and bought one (it can be taken back to the store within 14 days if it does not work). The gamepad connects to my iOS devices fine, and it has its own config app, which I downloaded, and after setting the gamepad to iOS mode, it is able to register the button hits and the joystick moves in its own app in test mode.

However, when I fire up the BrickController2 app, it does not register any joystick movement or button clicks. Any ideas why this is @imurvai? Is it possible that your app is using a different communication API than its own app? Are there multiple ways to do this on iOS?

As far as I understand, after successfully pairing the gamepad with the phone, I don't need to do any further configuration in the BrickController2 app, it should just be able to register events on the Controller tester screen, right?

BTW, I have tried this with 3 devices (two with iOS version 12.5, and one with 15.3), connecting the gamepad works on all devices, but BrickController2 does not register events on any of them.

Share this post


Link to post
Share on other sites
1 hour ago, gyenesvi said:

So I have been trying to figure out which gamepads could possibly work with iPhone/iPad and are also easily accessible here, and I found the iPega 9129 that I like (for about $22). So I jumped on it and bought one (it can be taken back to the store within 14 days if it does not work). The gamepad connects to my iOS devices fine, and it has its own config app, which I downloaded, and after setting the gamepad to iOS mode, it is able to register the button hits and the joystick moves in its own app in test mode.

However, when I fire up the BrickController2 app, it does not register any joystick movement or button clicks. Any ideas why this is @imurvai? Is it possible that your app is using a different communication API than its own app? Are there multiple ways to do this on iOS?

As far as I understand, after successfully pairing the gamepad with the phone, I don't need to do any further configuration in the BrickController2 app, it should just be able to register events on the Controller tester screen, right?

BTW, I have tried this with 3 devices (two with iOS version 12.5, and one with 15.3), connecting the gamepad works on all devices, but BrickController2 does not register events on any of them.

Bro, u need to use PS4/5 gamepad, they are supported by iOS.

Share this post


Link to post
Share on other sites
1 hour ago, gyenesvi said:

So I have been trying to figure out which gamepads could possibly work with iPhone/iPad and are also easily accessible here, and I found the iPega 9129 that I like (for about $22). So I jumped on it and bought one (it can be taken back to the store within 14 days if it does not work). The gamepad connects to my iOS devices fine, and it has its own config app, which I downloaded, and after setting the gamepad to iOS mode, it is able to register the button hits and the joystick moves in its own app in test mode.

However, when I fire up the BrickController2 app, it does not register any joystick movement or button clicks. Any ideas why this is @imurvai? Is it possible that your app is using a different communication API than its own app? Are there multiple ways to do this on iOS?

As far as I understand, after successfully pairing the gamepad with the phone, I don't need to do any further configuration in the BrickController2 app, it should just be able to register events on the Controller tester screen, right?

BTW, I have tried this with 3 devices (two with iOS version 12.5, and one with 15.3), connecting the gamepad works on all devices, but BrickController2 does not register events on any of them.

Hi,

Once the gamepad is paired with the phone there is no need to do anything else. BC2 uses the standard gamepad API. Does the contorrel tester work in BC2 with your gamepad? And did you try it with games eg.? Maybe the controller is in a wrong mode. Unfortunately I'm not familiar with that controller.

Share this post


Link to post
Share on other sites
3 hours ago, WW Bricks Studio said:

Bro, u need to use PS4/5 gamepad, they are supported by iOS.

Yeah, and it's 3x the price. Since I am not using it for anything else, that's not the first option I'd like to try.

2 hours ago, imurvai said:

Does the contorrel tester work in BC2 with your gamepad?

That's what I tried and that's not working.

2 hours ago, imurvai said:

And did you try it with games eg.?

I don't play any such games, but I tried with the config app advised by the gamepad's documentation, and that is working fine, all events from buttons and joys are received.

2 hours ago, imurvai said:

Maybe the controller is in a wrong mode.

According to the documentation of the gamepad, it has 3 modes, 2 for Android, and 1 for iOS. I set it to the iOS mode. (I tried in the other two modes as well, but then even the official config app is not working, it detects that it's in the wrong mode).

I might try and download some game for testing. Can you suggest one that is free and can try this easily?

Share this post


Link to post
Share on other sites

@imurvai: first of all thanks a lot for your app - really appreciate it! :)

I currently have a problem with a PU motor used as a servo that maybe someone can help me with...
If I use auto-calibration, the servo moves to both "endpoints" but afterwards it does not stop in the middle, but clearly off-center!

At first I thought that I might have overlooked something while building the model (i.e. needing to align the motor / gear rack in a certain way upon assembly), but since the rotation encoder should have a resolution of 1 degree, I no longer think that this is the case.
I also tricked the PU App to calibrate the servo (had to switch ports & connect another motor to do that) and the LEGO App calibrates correctly - pretty much dead center.

Is there a know issue with auto-calibration?
Maybe something to do with crossing the 0/360 rotation encoding at a bad spot?

Is there a way to see the values chose by auto-calibration and modify / correct them somehow?
Can the servo be calibrated manually? I did not have time to really investigate, but so far I have not been able to find a manual option.
(I would also need the plain values for all extreme positions in order to do that, I guess...)

Edit: I forgot to mention that I have two other models where auto-calibration works fine!
(a stock 42109 & "Rocky" by @Didumos69 - I am currently building "Hot Trot", also be @Didumos69)

Edited by Toshi
forgot something...

Share this post


Link to post
Share on other sites
27 minutes ago, Toshi said:

I currently have a problem with a PU motor used as a servo that maybe someone can help me with...
If I use auto-calibration, the servo moves to both "endpoints" but afterwards it does not stop in the middle, but clearly off-center!

Hi, I need to check how I implemented it (it was quite some months ago :) ), but as far as I remember the auto calibration tries to find the nearest 90 degree position to the center. Most probably in your model it's not the exact center position. The reason is that the endpoints can't be measured precisely, therefore the exact center can't be calculated. What you can do is to manually calibrate your servo.

Also:

Good news, version 3.1 has been released for Android too (for iOS it has been out for a couple of weeks).

It contains the BuWizz 3 servo support which has been added by Vit Nemecky. Many thanks for that.

Edited by imurvai

Share this post


Link to post
Share on other sites

Hi, would be cool to understand how it is implemented! :)

What do you mean when you say that measuring the endpoints is not precise?

Using the nearest 90 degree position sounds somewhat situational.
I guess this means I was lucky with the other two models, where it is working correctly?!
If I remember correctly, both 42109 and 42099 use an L-Motor for steering and XL-Motor(s) for driving.
(I only built 42109 once and in 421099 there was no possibility for a mixup of motors)
If Lego usually ships the motors in "90-degree-alignment" and the L-Motor was never used for driving, this might explain it for my other models.
Since "Hot Trot" uses 42129 as a base and has 3 L-Motors, it is certainly possible I used one of the L-Motors used for driving before as a servo now...
So it is certainly possible the angle in this motor was not a multiple of 90 when I put the gear rack in place... ;)

I do not have the model & remote with me right now, but I will check how to do the manual calibration later on!

Edited by Toshi
Clarification

Share this post


Link to post
Share on other sites
On 4/19/2022 at 4:03 PM, Toshi said:

Hi, would be cool to understand how it is implemented! :)

What do you mean when you say that measuring the endpoints is not precise?

Using the nearest 90 degree position sounds somewhat situational.
I guess this means I was lucky with the other two models, where it is working correctly?!
If I remember correctly, both 42109 and 42099 use an L-Motor for steering and XL-Motor(s) for driving.
(I only built 42109 once and in 421099 there was no possibility for a mixup of motors)
If Lego usually ships the motors in "90-degree-alignment" and the L-Motor was never used for driving, this might explain it for my other models.
Since "Hot Trot" uses 42129 as a base and has 3 L-Motors, it is certainly possible I used one of the L-Motors used for driving before as a servo now...
So it is certainly possible the angle in this motor was not a multiple of 90 when I put the gear rack in place... ;)

I do not have the model & remote with me right now, but I will check how to do the manual calibration later on!

Yes, the zero point can be set to any position, but found that it is safer to restrict the automatic calibration to set the zero position 90 degrees aligned. Simply it was the most stable solution. If your model requires the zero point to be set elsewhere, then you can use the manual calibration.

Share this post


Link to post
Share on other sites

Okay, thank you for looking it up!

I still have not figured out how to configure the Servo manually though… :(

Share this post


Link to post
Share on other sites

Hi Istvan! big thanks for continuous efforts on your great app! two questions please:

- for PU M motor, acting as servo - shall I use servo mode (that seems to move the steering to the very maximum right position once connected) or normal mode (which seems to work, as in move left and right but won't return to center). I haven't found any calibration functionality so far

my buwizz 3 works with your iOs app, but on my android phone, it can't be found since last update (both app and buwizz firmware). in the "devices" window, when clicking the magnifying glass button i only receive a "warning - error during scanning" :-(

 

hope you can advise. Thanks!

Share this post


Link to post
Share on other sites
13 hours ago, wower said:

my buwizz 3 works with your iOs app, but on my android phone, it can't be found since last update (both app and buwizz firmware). in the "devices" window, when clicking the magnifying glass button i only receive a "warning - error during scanning" :-(

Hi, Just got my new phone running Android 12 and I'm facing the same issue. I'm on it and push the fix as soon as possible.

Share this post


Link to post
Share on other sites
16 hours ago, wower said:

my buwizz 3 works with your iOs app, but on my android phone, it can't be found since last update (both app and buwizz firmware). in the "devices" window, when clicking the magnifying glass button i only receive a "warning - error during scanning" :-(

 

Same problem here on Android 12. also I notice that the app doesn't ask for location permission anymore. I see no way to give the app this permission. When I check the app permissions in the Google Play Store there is no location permission. 

Share this post


Link to post
Share on other sites
12 minutes ago, MisterFountain said:

Same problem here on Android 12. also I notice that the app doesn't ask for location permission anymore. I see no way to give the app this permission. When I check the app permissions in the Google Play Store there is no location permission. 

Yes, I removed this permission request from v3.1 and it worked on my old phone that way (don't really understand why as Android used to require that permission before).

I just added back the location permission request but bluetooth scan still doesn't work on Android 12. So I keep investigating it...

Share this post


Link to post
Share on other sites
2 minutes ago, imurvai said:

Yes, I removed this permission request from v3.1 and it worked on my old phone that way (don't really understand why as Android used to require that permission before).

I just added back the location permission request but bluetooth scan still doesn't work on Android 12. So I keep investigating it...

I just installed version 3.1 on a old Samsung Galaxy S8 with android 9, the scan error is gone but it can't find my Control+ hub because there is no location permission, so one thing is for sure....the location permission is absolutely necessary.

Share this post


Link to post
Share on other sites
4 hours ago, MisterFountain said:

I just installed version 3.1 on a old Samsung Galaxy S8 with android 9, the scan error is gone but it can't find my Control+ hub because there is no location permission, so one thing is for sure....the location permission is absolutely necessary.

The fix is on it's way...

Share this post


Link to post
Share on other sites

As I can see version 3.2 is already out in the PlayStore. Please let me know if the fix is working.

Share this post


Link to post
Share on other sites
On 4/21/2022 at 2:07 PM, Toshi said:

I still have not figured out how to configure the Servo manually though… :(

I figured it out in the end, so it works as intended now! :classic:

My problem was that the definition of the center position and the definition of the max steering angle are not on the same "page" in the configuration.
That prevented me from making the connection at first, I guess...

Manual configuration was a bit "trial & error", because I needed to set a value, then start the profile in order to test it and repeat this until everything was the way I wanted it to be.
It would be very cool if this was either more interactive (changing both values while the profile is running), or if you could see the current values during configuration or at least the result of the automatic configuration!
(maybe something to keep in mind in case you feel bored some day :wink:)

Edited by Toshi
added smilie icons

Share this post


Link to post
Share on other sites
On 4/23/2022 at 7:43 PM, wower said:

 

- for PU M motor, acting as servo - shall I use servo mode (that seems to move the steering to the very maximum right position once connected) or normal mode (which seems to work, as in move left and right but won't return to center). I haven't found any calibration functionality so far

maybe i missed it, but has this topic been addressed? toshi mentioned the complex calbration.. is there some sort of manual available perhaps? i am not sure i understood all that.. :-)

Share this post


Link to post
Share on other sites

Hi Everybody, especially @imurvai.
I already know currently the app cannot work in the background, not to even mention when the display is off. Any chance to get that implemented? There are some possible workaround even in newer Android version: https://proandroiddev.com/background-ble-scan-in-doze-mode-on-android-devices-3c2ce1764570

If it's not going to happen anytime soon, then maybe at least a fake "display off" mode that will make the app go to full screen and set the entire screen black? This would conserve the screen, especially the AMOLED type.

Share this post


Link to post
Share on other sites
On 5/1/2022 at 10:28 AM, Embrion said:

Hi Everybody, especially @imurvai.
I already know currently the app cannot work in the background, not to even mention when the display is off. Any chance to get that implemented? There are some possible workaround even in newer Android version: https://proandroiddev.com/background-ble-scan-in-doze-mode-on-android-devices-3c2ce1764570

If it's not going to happen anytime soon, then maybe at least a fake "display off" mode that will make the app go to full screen and set the entire screen black? This would conserve the screen, especially the AMOLED type.

Hi, actually the problem with working in background is relating to the controller input, not the bluetooth. The controller events are dispatched only to the application in focus unfortunately. This is why I implemented the dark mode, to save some battery on amoled devices, but a fake display off is also a good idea. I'll try to implement it.

Share this post


Link to post
Share on other sites

Trying to play with this app recently, it is great! Thanks! One issue I noticed that sometimes, it keeps connecting to the buwizz 2.0 when my XBox One controller is connected to phone (iphone) with bluetooth. If I disconnect the XBox One controller, the buwizz 2.0 can be connected successfully. Any idea how to fix it? 

Share this post


Link to post
Share on other sites
22 hours ago, imurvai said:

Hi, actually the problem with working in background is relating to the controller input, not the bluetooth. The controller events are dispatched only to the application in focus unfortunately. This is why I implemented the dark mode, to save some battery on amoled devices, but a fake display off is also a good idea. I'll try to implement it.

Hi, thanks for the reply. Silly me, you're right regarding the input going automatically to the active app/window. The dark mode helps battery, that's true, but we still have a risk of AMOLED burnouts. If you could, that would be great! From the coding point of view it would be something like: full screen + all black/black top layer/canvas and to exit it a phone button (power or maybe a vol+power combination?) or mappable input device button press?

Share this post


Link to post
Share on other sites

Using the controller button to toggle black screen mode would be interesting too. 

Edited by Jayden

Share this post


Link to post
Share on other sites

Let me ask @imurvai two questions about the Brick Controller 2:

1. Does the latest version 3.2 for Android devices support the Buwizz 3.0 all of PoweredUp motor modes: normal, servo and stepper?

2. The same question for LEGO Powered UP HUB 88009?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.