Android motion controller for Hexy now available for testing

Greetings everyone! I’m happy to announce that my Android motion controller for Hexy is now available for testing!

You can get the APK here. I also plan to release on Google Play in the near future.

code.google.com/p/andmoco/downloads/list

The change log is available here:

code.google.com/p/andmoco/wiki/ChangeLog

If you find any bugs, please let me know either here (on this thread) or by filing the bug at code.google.com/p/andmoco/issues/list.

The code is available at code.google.com/p/andmoco/source/checkout and available under the Apache 2.0 license (i.e. open source). Patches, feature requests, bug reports, and the like are all welcome.

Edit:

  • Linked to general downloads list instead of a specific download.
  • Added change log.

That’s pretty exciting, can’t wait to have a crack with this code, but no free time for two weeks! Thanks :smiley:

Sweet! I’ll have to play with this :wink:

I haven’t done a lot with it, but it seems to work on a Nexus 7 and Nexus 10, but the Kindle Fire HD won’t pair with the Hexy.

I assume I have to zero everything using my PC then type the figures into the app? It doesn’t look like there is an easy way to use the android app to zero the servos.

Ralph

I’ve now had the briefest play with this. Got it paired and Hexy moved :smiley: Seemed to be a little unstable when launching, but did run the moves (possibly limited movement on the Ankle joints?).

Excellent work, can’t wait to see what you can do with this. Will be grabbing the source at some point to use as the kernel of another project. Good job!

Samsung Galaxy S2 (i9100) running CM10.1

Thanks for trying it out! I just pushed a bug fix to my git repo and uploaded a new APK. This fix adds mostly automatic bluetooth pairing (user still needs to type “0000” for the pin number) and resolves an issue with screen rotation events. You can get the new version, AndMoCo v1.1, here:

code.google.com/p/andmoco/downloads/list

If you run into any bugs, please let me know. The issue tracker, code.google.com/p/andmoco/issues/list, has the list of current know issues and planned features.

I presume that you mean this repo (https://github.com/DeviousToast/AndMoCo) for your source?

My main repo is the Google Code repo (see link in the OP). I setup the GitHub repo because I wasn’t initially sure which host I wanted to use. For now only Google Code has the most recent commits.

[quote=“ralphtrickey”]I haven’t done a lot with it, but it seems to work on a Nexus 7 and Nexus 10, but the Kindle Fire HD won’t pair with the Hexy.

I assume I have to zero everything using my PC then type the figures into the app? It doesn’t look like there is an easy way to use the android app to zero the servos.

Ralph[/quote]

I’m working on some UI to allow direct control of individual servos. You’ll be able to move a servo to a specific position and then declare that position “0”. AndMoCo will then calculate and save the offset for you. Feel free to follow code.google.com/p/andmoco/issues/detail?id=9 for progress on the feature.

As for the Kindle Fire HD, I’m not sure what’s going on there. Can you try the latest AndMoCo release (v1.1) and see if it works? If it doesn’t, do you know how to use the adb tool to capture logs? I’d be interested in the logcat output starting from just before you open AndMoCo to the point where you feel it’s failed to pair with Hexy. Please upload the logs to a new issue on code.google.com/p/andmoco/issues/list.

awesome, been looking forward to just this thing, cant wait to test it out

Writing some android code was going to be first on my list after I have my Hexy built. Let me know if you’re looking for any help.

Contributions are most welcome! Please see code.google.com/p/andmoco/issues/list for the current list of issues that need to be addressed. New features not on the current issue list are welcome too. Please message me to coordinate which issues you’d like to work on.

I attempted to load AndMoCo_1.1 on my aging Droid Incredible and immediately received a parsing error. After learning way more than I expected about the Android SDK over a period of about 4 hours last night I found my problem was really, really easy to identify. The Incredible uses Android 2.3.4 (Gingerbread MR1) which is API level 10. The provided source is at a minimum API level 14 (ICS) with a preferred level 17 (Jelly Bean MR1). After reviewing the documentation on the Android Developers forum it appears that the only upgrades to the bluetooth features betwen 10 and 14 have to do with, A2DP, HSP profiles, and Health Devices; although I may be missing something since I don’t do Android development (still trying to teach my son Python). Anyway, to make a long question short, has there been any attempt to run the application on one of the older flavors of Android? Best case, I can get this working over the next few days. Worst case, I have to wait till I pick up a new phone.

On a related note, this may be the same problem Devious Toast is seeing. I have to go back and check the API level to verify.

Thanks for the bug report. I haven’t tried porting to older versions of Android yet. If it’s as simple as switching the min API version to one that supports the Gingerbread branch, then that should be pretty easy.

I’m working on version 1.2 of AndMoCo and almost have all the issues fixed needed to make the release. I expect to wrap up those remaining issues and build the release some time next week (this week’s been a bit too busy at work). I’ll try adjusting the min API version. If it still works, I’ll build it into v1.2. If it’s more complicated than just changing the min API version, then I’ll have to work on it after the v1.2 release. I created code.google.com/p/andmoco/issues/detail?id=20 to track this fix. Feel free to follow the issue. I intend to announce on these forums when 1.2 is ready, including its change log.

The code looks great, works great too. However, I have now lost my 2nd servo while using this app. Thankfully I have spares. I was going to post after the first one broke (a hip while trying to walk), but decided it must have been something on my end. Now that I’ve lost a knee while trying to “Get Up” I feel it isn’t on my end anymore. I’m using a Nexus 7 to run the app, and my hexy is fitted with Turnigy metal gear servos. I’ve done all I can to make the little bugger as sturdy as possible, and my own code for moving him hasn’t caused any servo breaks (yet, anyway). Just a heads up to anyone using this, not trying to bad-mouth the author as honestly, the code itself is beautiful, but just be careful guys.

I’m really sorry to hear that about the servos. I’m currently working on the next release, which includes a lot of fixes, including major improvements to how AndMoCo moves Hexy. If you can provide some more details about what happened (i.e. were the movements pushing the servos limits?), that would be very helpful for debugging. I’ll announce on these forums when the new release is ready.

No worries, no apologies needed. I’m sure there’s been hundreds of dead servos for hundreds of reasons with Hexy. Like I said, spares!
The hip broke when I first tried to get him to walk using your app, it seems like the wait time between moves isn’t long enough, but only on that move. The knees don’t get time to raise off the ground, so he ends up trying to shuffle forward, leading to strain on the hip servos. I noticed the same thing in v1.1 when I tried it last night.
As for the get up, his foot caught on the floor when the ankle was centering. Usually not a problem, they can take a bit of a beating, but the rest didn’t catch so I think a lot of pressure was put on the one ankle that was stuck underneath him.
Might be an idea to include the “ShutDown” move that affan2 posted here PoMoCo Moves, makes a better base for using “get up” from than center all (from what I’ve found anyway), sometimes Hexy just falls over and set zero isn’t right to make him stable enough to stand back up.

Cheers

I see what happened. Looks like AndMoCo was confused about the position of the servos. That validates a suspicion I had a little while ago and the fix that’s already in progress. This most definitely will be fixed with the next release. =)

Thanks for the pointer to the shutdown move. That’s much better than centering and potentially dropping hexy on its belly. I opened code.google.com/p/andmoco/issues/detail?id=21 to track its implementation.

I have not been able to get Hexy working with my Android Razr or my laptop. The Hexy is visible from my phone. When I start AndMoCo, I can pair with the Hexy and the Bluetooth light comes on solid, but I can not get the Hexy to move. When I stop AndMoCo, the Bluetooth light goes back to flashing mode.

I have the Hexy plugged into my auxiliary power supply (suggested by Joe which works great when connected via USB). I also have a 9V plugged into the logic connector (which may redundant but I am not sure).

I have Bluetooth turned off on my laptop. I have tried connecting via Bluetooth from my laptop and the Hexy appears in my Devices and it is assigned to a COM port. When I start PoMoCo on the laptop, the Bluetooth light on the Hexy is still blinking and PoMoCo does not move any of the servos.

Thanks for any suggestions.

Chuck

Same issue for me. The bluetooth controller installed fine and it paired up with my phone [Jellybean - Droiad Razr MAXHD]. When I try controls from the AndMoCo app nothing happens. I did not hook up power to the logic board because I thought that was only needed if bluetooth did not power up or pair.

Not sure what I am doing wrong.