imurvai Posted September 2, 2019 Author Posted September 2, 2019 On 9/1/2019 at 12:59 PM, Lok24 said: Hi, sorry, it's still not working, V 1.7. FW: 3x Smart Hub 1.1.00.0004 2x Move Hub 2.0.00.0017 1xTechnic Hub 1.0.00.0020 Technic Hub only works porperly if three motors according to 42099 are attached, but this is ssurely port of the FW. With all SBrick, Move Hub and technic Hub all motors can be controlled in the "device" section. With all three Smart Hubs no motor at all (WeDo, Boost, Train) can be controlled in the "device" section. Strange! That's wierd. The technic hub should work with any combination of motors. WeDo is not supported in BC2 but Boost and Train should work. I know it's not an explanation to your problem, I'm just saying what is working for me and for most of the users. Does Boost and the Train hub connects in the device section? Or it connects but the sliders don't move the motors? And can the SBrick, Move hub and technic hub be controlled using the gamepad or they only work in the device screen? Quote
imurvai Posted September 2, 2019 Author Posted September 2, 2019 On 9/1/2019 at 12:59 PM, Lok24 said: Technic Hub only works porperly if three motors according to 42099 are attached, but this is ssurely port of the FW. Just got my technic hub and managed to reproduce this issue. Trying to fix it... Quote
Lok24 Posted September 2, 2019 Posted September 2, 2019 (edited) Hi, thanks for your response. 1.) All Hubs can be scannend and connected, LED is on, IP-Adress is shown in app . 2.) All Hubs show same behaviour: - If they work with slider under "device", they work with gampad too. - If they don't work with slider under "device", the don't work with gamped as well. 3.) Technic Hub: I was wrong, it doesn't need three motors, but two XL on A+B. Otherwise (A only) it does't work (no slider, no gamepad) Removing B-Motor: no reaction an A any more. But: it needs the motors connected when connecting it to the LEGO Control+ App, so there might be some issues in the FW of the Hub concerning that. 4.) Smart Hub is scanned and found, connected, but Sliders and gamepad show no reaction with any motor (Boost, train) 5.) They all work with my raspberryPi, a python program and are all simultaniously controlled be the LEGO PU Handheld 6.) No WeDo Motor supported? It should work with the same command? 7.) Here's the same, if I understand correctly:https://github.com/imurvai/brickcontroller2/issues/8 Edited September 2, 2019 by Lok24 Quote
kbalage Posted September 2, 2019 Posted September 2, 2019 1 hour ago, Lok24 said: 3.) Technic Hub: I was wrong, it doesn't need three motors, but two XL on A+B. Otherwise (A only) it does't work (no slider, no gamepad) Removing B-Motor: no reaction an A any more. But: it needs the motors connected when connecting it to the LEGO Control+ App, so there might be some issues in the FW of the Hub concerning that. Not sure if it is a fw limitation as you can make the 4th port work in BC2 and that does not work in Control+. 1 hour ago, Lok24 said: 4.) Smart Hub is scanned and found, connected, but Sliders and gamepad show no reaction with any motor (Boost, train) I can confirm the same symptoms, the latest update apparently broke the control of the Smart hub, it was working previously. There were no recent fw updates on the Smart hubs. @Lok24 how did you check the fw version of the hubs? Quote
Lok24 Posted September 3, 2019 Posted September 3, 2019 10 hours ago, kbalage said: Not sure if it is a fw limitation as you can make the 4th port work in BC2 and that does not work in Control+. The limitation in the firmware is there when connecting(!) to the control+ App, so it might be possible that these routines also influence other connection methods in any way. 10 hours ago, kbalage said: how did you check the fw version of the hubs? Just send the two commands: char-write-req 000f 0100 char-write-req 000e 0500010305 Quote
imurvai Posted September 3, 2019 Author Posted September 3, 2019 Yesterday I played a little bit with the technic hub and its motors and found the followings: - If only one XL motor is connected it doesn't move (most probably the virtual port is not working in this case), the connected L motor is still functioning - Connecting one XL and one L motor to the PUP hub (batmobile, train) the motors don't move, most probably another virtual port issue (motors should be identical???) - Servo motor works better if the stop state is HOLD instead of BRAKE (current implementation in BC2) - There are still open question regarding the calibration process but it gets clearer. At least I managed to figure out what the control+ app does. I'd like to come up with a more general solution... - I need to improve the virtual port setup 'cause I've been reported not functioning PUP and train hubs. Quote
Limga Posted September 3, 2019 Posted September 3, 2019 1 hour ago, imurvai said: I'd like to come up with a more general solution... I still don’t have any personal experience with the Control+ and new motors (and new BC2), but in my experience with Mindstorms EV3 the following calibration solution worked flawlessly with the steering motor: 1. After powering up we assume that position of motor is zero. 2. Turn motor in one direction until it stalls. 3. Turn motor in other direction until it stalls, save the measurement of an angle. This angle is the full range. To find a “zero”-position motor just need to be turned again at the half of that angle. And to keep wheels straight motor just need to hold that position. Can such algorithm be implemented in BC2? Quote
imurvai Posted September 3, 2019 Author Posted September 3, 2019 Just now, Limga said: I still don’t have any personal experience with the Control+ and new motors (and new BC2), but in my experience with Mindstorms EV3 the following calibration solution worked flawlessly with the steering motor: 1. After powering up we assume that position of motor is zero. 2. Turn motor in one direction until it stalls. 3. Turn motor in other direction until it stalls, save the measurement of an angle. This angle is the full range. To find a “zero”-position motor just need to be turned again at the half of that angle. And to keep wheels straight motor just need to hold that position. Can such algorithm be implemented in BC2? Actually this is how the official C+ app calibrates the servo. What I don't like about it is that the servo stresses the plastic when it measures the operating range. Yesterday I tried to regulate the turning angle using a simple black pin and the servo bent it a bit and I could even hear a cracking sound. And also if you build a moc using a push rod steering mechanism instead of using the steering rack it could be possible that the mid point of the measured range is not the straigh direction. So I'd like to add some adjustment setting. Quote
kbalage Posted September 3, 2019 Posted September 3, 2019 22 minutes ago, Limga said: 3. Turn motor in other direction until it stalls, save the measurement of an angle. This angle is the full range. To find a “zero”-position motor just need to be turned again at the half of that angle. And to keep wheels straight motor just need to hold that position. I still have doubts that the app uses the "middle of the max angles is the zero position" approach. You can do a simple test - block the orange beam that connects the links and the front hubs with your finger on one side. During calibration the steering will be able to turn fully in one direction but will be limited on the other side. Despite this the proper straight position will be still found and set. These motors have the ability to provide information about their absolute position and not only the relative, the challenge is to figure out how that data is provided and how it can be used. Quote
Philo Posted September 3, 2019 Posted September 3, 2019 (edited) 27 minutes ago, kbalage said: These motors have the ability to provide information about their absolute position and not only the relative, the challenge is to figure out how that data is provided and how it can be used. Yes, these motors do contain an absolute encoder. The problem is that (unlike Spike Prime motors) there is no external 0 position mark. The app may be able to use that encoder after testing the 4 possible orientations of axle into motor hub. FYI, encoders data is returned on ID2 line in 10 bytes frames. First byte is D8 Second signed byte contains the motor rotation speed (dunno the units) 4 bytes signed dword containing the relative encoder position 2 bytes signed word containing the absolute encoder angle (-179..180) 1 zero byte (future use?) Last byte is checksum. The 2 bytes for angle are zero for the Boost motor that doesn't contain an absolute encoder. And yes, I'll be publishing more results on my findings soon... Edited September 3, 2019 by Philo Quote
Lok24 Posted September 3, 2019 Posted September 3, 2019 (edited) And, additionally: The Boost Motor does the same, it's set 0 if programm starts The EV3 Motor has no absolute position, but you can "run until stalled". Edited September 3, 2019 by Lok24 Quote
imurvai Posted September 9, 2019 Author Posted September 9, 2019 On 9/3/2019 at 11:42 AM, Philo said: Yes, these motors do contain an absolute encoder. The problem is that (unlike Spike Prime motors) there is no external 0 position mark. The app may be able to use that encoder after testing the 4 possible orientations of axle into motor hub. FYI, encoders data is returned on ID2 line in 10 bytes frames. Hi @Philo, I managed to obtain the absolute positions from the new L and XL motors, so that I can calibrate the servos. This is the setup sequence for a given port to get notications on the absolute and relative positions: 05, 00, 42, portId, 02 -> lock the port for setup 0a, 00, 41, portId, 03, 02, 00, 00, 00, 01 -> requesting notification for abs position 0a, 00, 41, portId, 02, 02, 00, 00, 00, 01 -> requesting notification for rel position 08, 00, 42, portId, 01, 00, 30, 20 -> setting mode and data set 05, 00, 42, portId, 03 -> unlock the port and enable notifications After this sequence the hub starts sending notifications about the abs and rel position. It can be done for as many ports as needed. I tested it with one L and two XL motors at the same time and works OK. The notification format: messageLength, 00, 46, portId, 03, absPos0, absPos1, relPos0, relPos1, relPos2, relPos3 Positions are in two's complement in little endian format, abs is 16bits, rel is 32bits. Quote
Philo Posted September 9, 2019 Posted September 9, 2019 (edited) @imurvai, Excellent! So I guess your app will soon be able to use any motor configuration - too bad it doesn't work well on my phone (lag)... Going to publish soon my findings about Powered Up serial protocol. But unless LEGO releases more information, we are still a long way from beeing able to create custom sensors! Edited September 9, 2019 by Philo Quote
Philo Posted September 9, 2019 Posted September 9, 2019 1 hour ago, Philo said: too bad it doesn't work well on my phone (lag)... Update on this: I confirm this is an issue with my phone (Moto G5+), it works perfectly with my Asus tablet. Only drawback, it's more bulky Quote
AVCampos Posted September 9, 2019 Posted September 9, 2019 5 minutes ago, Philo said: it works perfectly with my Asus tablet. Only drawback, it's more bulky Get one of these, and your problem is solved. Quote
imurvai Posted September 16, 2019 Author Posted September 16, 2019 Hi, BC2 version 1.8 is now available for iOS in the AppStore - surprisingly the review process was faster now compared to the Android Play Store. Changes: - Automatic and manual calibration for PoweredUp servo motors. - Fixed output issues for Powered up hubs. - Fixed connection issues. The Android version is still under review, I'll let you know when it has been approved. Quote
PetSild Posted September 16, 2019 Posted September 16, 2019 (edited) Awesome so many new nifty features, I can't wait. Would it be possible for BC2 to send telemetry data as well as it has a C+ ? I think only the values without the graphics. Edit: I'm sorry, I wrote the question wrong, originally wanted to write to receive the data as: - Status battery capacity - Acceleration - Inclinometer Thank you for the answer. Edited September 16, 2019 by PetSild Quote
iuliand Posted September 17, 2019 Posted September 17, 2019 22 hours ago, PetSild said: - Status battery capacity That would be extremely useful for any kind of device that supports reporting it over Bluetooth. Or at least the battery voltage. Quote
imurvai Posted September 17, 2019 Author Posted September 17, 2019 32 minutes ago, iuliand said: That would be extremely useful for any kind of device that supports reporting it over Bluetooth. Or at least the battery voltage. Hmm, ok I try to add it to the app... BC2 version 1.8 is now available for Android too.Changes are the same as for the iOS version:- Automatic and manual calibration for PoweredUp servo motors.- Fixed output issues for Powered up hubs.- Fixed connection issues. Feedbacks are still welcome! Happy playing! :) Quote
PetSild Posted September 17, 2019 Posted September 17, 2019 The function of calibration for the control works flawlessly , great praise and thanks to the creators of the best app. Quote
kangaroo7 Posted September 17, 2019 Posted September 17, 2019 Hi all! Got Samsung Galaxy S9 and I downloaded the app. I connected the PS4 controller via bluetooth and it works in the application, but I can't find SBricks in devices scan. SBricks are paired with the mobile phone via bluetooth settings. I also use SBrick application. The version is one before the newest one (I had the same problem, couldn't connect to the SBricks in the application)... Does anybody have a solution to this problem? Quote
AVCampos Posted September 17, 2019 Posted September 17, 2019 You shouldn't need to previously pair the SBricks. However, at least for the initial search in BC2 I need to turn location on (it's a thing with Android, go figure). In other news, the newest Android version has been approved at the Play Store! Quote
imurvai Posted September 17, 2019 Author Posted September 17, 2019 36 minutes ago, kangaroo7 said: Hi all! Got Samsung Galaxy S9 and I downloaded the app. I connected the PS4 controller via bluetooth and it works in the application, but I can't find SBricks in devices scan. SBricks are paired with the mobile phone via bluetooth settings. I also use SBrick application. The version is one before the newest one (I had the same problem, couldn't connect to the SBricks in the application)... Does anybody have a solution to this problem? 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: Quote
Limga Posted September 17, 2019 Posted September 17, 2019 1 hour ago, imurvai said: Just made a short video on the new automatic and manual calibration feature and how to use it Seems wonderful to me! Thank you very much, now I am not afraid of buying new motors:) Quote
apachaihapachai Posted September 17, 2019 Posted September 17, 2019 (edited) Noticed a weird behavior when using analog stick on Logitech F310. Dpad works fine. upd: works the same way on another F310 and Xbox 360 controller upd2.: PF Servo + BuWizz works fine using the same setup Edited September 17, 2019 by apachaihapachai 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.