Recommended Posts

8 hours ago, apachaihapachai said:

Noticed a weird behavior when using analog stick on Logitech F310. Dpad works fine.

Hmm, it's a wierd behavior indeed. I'll try to reproduce and fix it...

Share this post


Link to post
Share on other sites
9 hours ago, apachaihapachai said:

Noticed a weird behavior when using analog stick on Logitech F310. Dpad works fine.

It looks as if it doesn't have enough power to return to center.

Maybe it uses the last analog value supplied by the joystick as reference for the return power, that being very small as it is close to zero (joystick center).

Share this post


Link to post
Share on other sites
Just now, iuliand said:

It looks as if it doesn't have enough power to return to center.

Maybe it uses the last analog value supplied by the joystick as reference for the return power, that being very small as it is close to zero (joystick center).

Yeah, it could be something like that. The current implementation uses the last joy position to calculate the speed the servo should turn with. Most probably the joy reports the 0 target position twice (or more) therefore the app calculates the minimum speed for the servo (which is 5 currently).
I also tried using the current position reported by the motor to calculate the turning speed but the notification from the motor wasn't fast enough. Anyway I'll try to tweak the algorithm. The worst case scenario would be turning the adaptive servo speed completely off and always use some reasonable fixed speed.

Share this post


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

Yeah, it could be something like that. The current implementation uses the last joy position to calculate the speed the servo should turn with. Most probably the joy reports the 0 target position twice (or more) therefore the app calculates the minimum speed for the servo (which is 5 currently).
I also tried using the current position reported by the motor to calculate the turning speed but the notification from the motor wasn't fast enough. Anyway I'll try to tweak the algorithm. The worst case scenario would be turning the adaptive servo speed completely off and always use some reasonable fixed speed.

Maybe let the user the option to tweak the response speed with a slider. By default being the maximum speed.

I see this working like this: The servo position is controlled by the joystick position and for turning speed is used the max speed by default. If the user wants to tweak the speed (and power) it uses the slider to tune it down.

edit: I tried to understand why would you use the position to calculate the turning speed (like you said you do) because in reality the joystick position should only affect the servo position not it's turning speed. Are you implementing a sort of overshoot protection by adjusting the speed too? Because otherwise the algorithm should strive to deliver the fastest servo turning speed at any time.

Edited by iuliand

Share this post


Link to post
Share on other sites
46 minutes ago, iuliand said:

edit: I tried to understand why would you use the position to calculate the turning speed (like you said you do) because in reality the joystick position should only affect the servo position not it's turning speed. Are you implementing a sort of overshoot protection by adjusting the speed too? Because otherwise the algorithm should strive to deliver the fastest servo turning speed at any time.

Exactly, it has been added to avoid the overshot. Using full speed even for small turnings made the servo behave kind of hectic.

Share this post


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

Does the app works (or in theory should) with USB Infrared Adapters like this one?

If the phone recognizes it as an infrared device then in theory it could work, but I haven't tried such an adapter.

Share this post


Link to post
Share on other sites

After reducing the friction in the steering mechanism of the model everything started to work better. You can control the model perfectly most of the time but nevertheless the L-motor struggles to return to center sometimes.

upd: after some tests I noticed something. Trying to steer using smooth moves of an anolog stick causes the L-motor to struggle. Trying to steer using aggresive and fast moves of an analog stick works better.

 

Edited by apachaihapachai

Share this post


Link to post
Share on other sites

Personally I find the slower centering for all models more natural than the extra sensitive what is used in C+.

Share this post


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

So neither BrickController2 nor the official SBrick app can see your SBrick? Is that correct?

Just made a short video on the new automatic and manual calibration feature and how to use it:

 

The latest version of SBrick application can't connect to SBricks. I reinstalled version 4.4 Update 13 and now it's working again...

I haven't tried previous versions of your application so I can't tell if they work or not. I would really appreciate if you could check and tell me what to do because controlling Lego sets with PS4 controller seems so much more comfortable...

By the way, from SBrick I didn't get any answer whatsoever, just a reply from a user on their forum...

Share this post


Link to post
Share on other sites

Awesome!

Minor gripe: I'd like the calibration screen to have a validation button. Currently I have to perform calibration, come back to controller action screen and not forget to use check button instead of back arrow. A bit misleading...

Share this post


Link to post
Share on other sites
Just now, Philo said:

Awesome!

Minor gripe: I'd like the calibration screen to have a validation button. Currently I have to perform calibration, come back to controller action screen and not forget to use check button instead of back arrow. A bit misleading...

Yeah, that's a fair request. I'll add that...

Share this post


Link to post
Share on other sites
3 hours ago, kangaroo7 said:

The latest version of SBrick application can't connect to SBricks. I reinstalled version 4.4 Update 13 and now it's working again...

I haven't tried previous versions of your application so I can't tell if they work or not. I would really appreciate if you could check and tell me what to do because controlling Lego sets with PS4 controller seems so much more comfortable...

By the way, from SBrick I didn't get any answer whatsoever, just a reply from a user on their forum...

To be honest I have no idea. Have you tried with another phone? BTW is only a connection issue or BC2 can't even find it during scanning?

Share this post


Link to post
Share on other sites

Thank you so much @imurvai for a new version of your app, works flawlessly with two C+ hubs at the same time!
I also have noticed reduced return-to-center speed when using analog stick instead of D-pad, but it doesn't feels critical. 

The only option i wish to have in the app is a mode, when you can chose limit for servo-motor in degrees or in revolutions. At this moment motor can only work in -360/+360 degrees, but, e.g. when you use worm gear + 24t gear for steering, you have to make 6 revolutions to turn output axle at 90 degrees. Is it possible to add this feature?

Share this post


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

To be honest I have no idea. Have you tried with another phone? BTW is only a connection issue or BC2 can't even find it during scanning?

I can't find SBricks in scanning.

I don't have another phone...

Share this post


Link to post
Share on other sites
2 hours ago, kangaroo7 said:

I can't find SBricks in scanning.

I don't have another phone...

I see. Please try with this app. If it can't find your SBrick then there must be some incompatibility between that and your phone. Sorry I don't have any other wise idea :(

Share this post


Link to post
Share on other sites

I do apologize if this question has been asked before, but I am currently using this app on my Galaxy S7 with an ipega controller+2 sbricks and it works perfectly so no problems there. Thanks for the awesome app, love the customazation options. I don't have much experience with bluetooth, but I think my issues is more with bluetooth in general, but I can't seem to find a fix online. What I wish to do is, have the brickcontroller app running on my phone and use a different app (like the camera) at the same time. It seems to turn off the brickcontroller app at that time and break the connection. If I reboot the app it works again perfectly, so it's probably some setting I might be able to change on my phone, but I don't have a clue where to look. Or is it simply not possible to have my example of the brickcontroller app and camera running at the same time? If that the case, I can stop looking. Another wish I have is to keep my phone locked with the app running, but that seems downright impossible from googling.

Share this post


Link to post
Share on other sites
4 minutes ago, Appie said:

I do apologize if this question has been asked before, but I am currently using this app on my Galaxy S7 with an ipega controller+2 sbricks and it works perfectly so no problems there. Thanks for the awesome app, love the customazation options. I don't have much experience with bluetooth, but I think my issues is more with bluetooth in general, but I can't seem to find a fix online. What I wish to do is, have the brickcontroller app running on my phone and use a different app (like the camera) at the same time. It seems to turn off the brickcontroller app at that time and break the connection. If I reboot the app it works again perfectly, so it's probably some setting I might be able to change on my phone, but I don't have a clue where to look. Or is it simply not possible to have my example of the brickcontroller app and camera running at the same time? If that the case, I can stop looking. Another wish I have is to keep my phone locked with the app running, but that seems downright impossible from googling.

Hi, the problem is that only foreground apps get the gamepad events, so it is an Android issue in fact. When the app goes to background it disconnects from the bluetooth devices not to drain the battery. This is why you see the connection dialog when going back to BC2.

I also would like to use my camera while playing so I already started adding a camera view feature into BC2 but it turned out to be time consuming to add so I can't promise any date when it is done.

Share this post


Link to post
Share on other sites

Ah ok, thanks for the information. And wow such a camera feature would be awesome!

Share this post


Link to post
Share on other sites

@imurvai - Is it possible to use BC2 with bluetooth keyboards?

I have a bluetooth keyboard that has arrow keys as well as a full keyboard and a mouse trackpad.
I can use this keyboard as an input device for my phone/smart TV/etc.
When I open Game Controller KeyMapper > Assign Controller, it recognises my bluetooth keyboard as a "controller", and I can see the values for the key presses.
However, when I open BC2 > Controller Tester, it doesn't recognise any of the key presses.  I think that this is because the keyboard isn't really a "gamepad" input device.

Could BC2 be extended to work with bluetooth keyboards in addition to gamepads?

This is the bluetooth keyboard that I'm using: https://www.amazon.com.au/gp/product/B015J6TEN8

Share this post


Link to post
Share on other sites
57 minutes ago, Splat said:

@imurvai - Is it possible to use BC2 with bluetooth keyboards?

I have a bluetooth keyboard that has arrow keys as well as a full keyboard and a mouse trackpad.
I can use this keyboard as an input device for my phone/smart TV/etc.
When I open Game Controller KeyMapper > Assign Controller, it recognises my bluetooth keyboard as a "controller", and I can see the values for the key presses.
However, when I open BC2 > Controller Tester, it doesn't recognise any of the key presses.  I think that this is because the keyboard isn't really a "gamepad" input device.

Could BC2 be extended to work with bluetooth keyboards in addition to gamepads?

This is the bluetooth keyboard that I'm using: https://www.amazon.com.au/gp/product/B015J6TEN8

Hm, interesting idea. I'll definitely look into how it would be feasible.

Share this post


Link to post
Share on other sites

More on calibration of servos...

I built @grohl 42099 B model (racing truck). But this model doesn't include an index finger ensuring that centered steering occurs at multiple of 90° shaft position. So BC2 (or official app for that matter) doesn't auto center properly. For this kind of model, it would be better to center steering in the middle of end of travel of steering rack. Fortunately the manual calibration does the trick for now ;)

Share this post


Link to post
Share on other sites
34 minutes ago, Philo said:

More on calibration of servos...

I built @grohl 42099 B model (racing truck). But this model doesn't include an index finger ensuring that centered steering occurs at multiple of 90° shaft position. So BC2 (or official app for that matter) doesn't auto center properly. For this kind of model, it would be better to center steering in the middle of end of travel of steering rack. Fortunately the manual calibration does the trick for now ;)

Actually this is why I added the manual calibration if for some reason the automatic doesn't work properly it can be used as a fallback.

But it made me think that in this case a 12T is used to move the steering rack, so the automatic calibration could work if it aligns the servo to a position that is multiple of 30° instead of 90°. For 8T it would be multiple of 45°.

Share this post


Link to post
Share on other sites
On 9/19/2019 at 6:52 PM, imurvai said:

I see. Please try with this app. If it can't find your SBrick then there must be some incompatibility between that and your phone. Sorry I don't have any other wise idea :(

I tried nRF Connect for Mobile that you suggested and I can find Sbricks and connect to them in the application. But still in your application I can't find Sbricks. I also updated your app to the latest version 1.9

Also, I tried to scan in your app while connected in nRF and again nothing...

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.