-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Capture packets to figure out how to move a interactive motor to a precise angle #18
Comments
OK, I'll try. The problem with capturing is that I have to establish several sessions until one gets captured and even then just for a while so have to be quick. Not sure if it is a problem with my Android phone (I don't have an Android tablet with BLE), BOOST, my laptop or even ubertooth sniffer itself. Will also give some whole capture files for everybody to look at it instead of just waiting for my findings. I only capture late at night because it requires full attention so expect just a few captures each night. |
OK, I got it. motor A 50º at 100%: motor A 1º at 100%: motor A 25º (19h) at 50% (32h): I can turn motor A by 1º at 100% duty cycle with: Sorry but don't have capture files. Today I can't capture not even one initiall connection session. I'm at work (my first captures were at home and then I went on holidays) and there are a few laptops and smartphones around... I think my ubertooth sniffer needs a clean environment to work. To get this captures I had to keep pressing the green start/run/play/whatever block until something was captured. |
I tried to capture a long rotation command but cannot capture anything else and I'm getting warnings that battery is low (but it is not, at least the battery level shown when selecting the LEGO Move Hub is Full). But the maximum angle that the App allows is 9999 or 27 full rotations and a bit more than 3/4 (9999 = 27x360+270+9 degrees) that will be 270Fh so only two bytes are needed. |
I think @hobbyquaker got sniffing equipment as well now and may soon provide captures as well. Wrt my original issue, I can do this know. The motor-angle notifications report the location of the motor, and you can simply rotate until you reach the desired state (w/ a low dutycycle to keep it precise). We have all that is necessary documented. I'm keeping this issue open, since I still wonder whether there might be an additional "turn-to" packet in addition to the "turn-by" and "duration" ones we already have. |
If such a command exists we need a block in the App to generate it for capture or keep trying issuing our own commands randomly. But honestly I don't expect it. I don't see the BOOST designed as a robotic product. Perhaps things change and future firmware versions make me change my opinion. |
Going through Lego BLE doc, and I think their "GotoAbsolutePosition" is just what you need. Here is a quick example of command in Swift. Though, no guarantee that it works properly
|
I’m a little stuck w/ the interactive motor. The angle based motor movement works kinda ok, but if I move forward and backward by say 40 degrees, the movement isn’t exact (also it is a move-by, not a move-to-angle). i.e. Vernie’s head doesn’t end up in the same position.
My assumption was that the interactive motto should be able to do this? And maybe even report the current position (but subscribing to the port values on 0x2 gives seemingly random values?)
However, it seems like the iPad app can do this. Shaking the head, it always seems to return the head to the 0-degree position.
It would be great to get some packets which reveal how to do this. I would think there is either a different command than the angle-one we currently have (a turn(to: angle) instead of turn(by: angle)), or there are notifications which report the current angle (so that the application can adjust it until it hits 0-degree).
Thanks! :-)
The text was updated successfully, but these errors were encountered: