Android Dev Teaser

Before the rugrat showed up, I managed to make some progress on my next project. I just realized that I hadn’t put together a teaser post, hence this quickie.

I started thinking about how to make a better UI to control my remote control via Android project. Instead of going with a touch base, I figured I could implement control utilizing the on-board orientation sensors.

This ultimately led to figuring out how to break said values out…a la this little app:

xyz

precisely

I wrote a simple app that dumps the sensor values of each x, y, and z axes, for values between -90 and +90 degrees.

The next step would to be to clean up the display, provide some visualizations, (graph-ish perhaps) and use the values to control something physical. No promises on the timeline, but if it gets to be too far out, I will dump this code on GitHub for general public perusal. Back to diapers…

IOIODC Project Details

Consider this the conclusion of the IOIO DC motor experiment until further notice…

IOIO DC Motor Code

still ugly

I’m chalking this up as a success. Even though it is ugly and raw, I learned a ton mashing this thing together. Very fulfilling project from a nerd standpoint: I learned more Java, had to buckle down and do a little EE, kicked up the soldering skills a notch, and introduced a few more components’ features into my ghetto skill set.

My code is live on github with a preemptive v1.0 push…

IOIO DC Motor Code

IOIO DC Motor Code

I also dumped the apk to the Android Market as promised.

Pins 21 though 26, wired through the usual candidates on an H-Bridge. Contact me with any details…it should be very spec sheet-heavy though. The main stumbling point is with the power source, so keep that on the front burner.

Cheers. This may be my last time intensive project for some time. Hardware is time-costly…I am planning to take on the software project I have been contemplating between diaper changes and feedings. Look for some dad stuff in the mean time…

Droid 4 vs Droid Razr

Flashback to 2010. A simpler time. I was finally abandoning my BlackBerry, which is basically one step above bag phone by today’s standards. I was torn between two devices: the Motoroala X and the Motorola Droid 2. I opted for the physical keyboard, and have not looked back.

Flash back to present. A time less simple. With Katie’s iPhone 4S in the mail, it is nearing my turn to make a decision regarding my new device. The best phone on the market, in my book, is the Droid Razr. The kicker is the soon to be released Droid 4…

moto droid 4

...hmm

This thing has the same stuff under the hood as the Razr, very, very similar to the duality between the Droid 2 and X. Trading .3 inches and AMOLED for a smaller qHD screen…sort of a tough call.

But…the good news is that I have a few months left before I need to make the decision. My Christmas wishlist instead is one involving Unusual Gifts this year. I am a sucker for strange electronic devices…that should be apparent from the remote controlled clock. I’m hoping to pick up some hackable gizmos that I can chop apart, and leave the phone decision for another day.

Bluetooth Servo Control Redux

The project is wrapped. I have fully shown servo control via bluetooth, via Android, via IOIO. +3 via

usb b gone

no hands

The easiest way to test this, by far, is to snag the app on the Android Market. Here:

servo bluetooth

market-y

This does require a newer version of the IOIO bootloader than is currently shipping from units at Sparkfun, but details can be tracked down at this Google Groups area on how to update. It will work standardly, with a USB cable.

From there, you can take a look at my code on GitHub.

push to git hub

pushed

I haven’t included the IOIO libraries, but that will be part of the Eclipse setup if you decide to start hammering out some code. I can provide some guidance if anyone is in need of any.

Take a look. I bumped the SDK minimum again, in order to ensure that this function is intact. If this causes any hardship, I can relax the requirement.

Anyhow, take a look at the app in action in the previous post. Cheers.

IOIO Bootloader Update

Well, I made some progress this weekend with respect to hardware, firmware, and bootloaders. My bluetooth IOIO implementation is still giving Eclipse shit-fits. I am seeing an error with the bluetooth library…it fails on compilation. Unfortunitely, I am running out of weekend, so will cut this one short and make a statement about the backend.

In order to replace that pesky USB cord with a sleek virtual cord, aka a bluetooth connection, one must update not only the IOIO application, but also the IOIO bootloader. The application is easy enough to flash, but he bootloader requires a programmer for updating. Luckily, Ytai was kind enough to design a ‘programmer by second board’ option, and incorporate that into the same UI as he utilized for flashing apps to the board. The first step was off to SparkFun for a second IOIO.

ioio android bootloader

clamptastic

I kept the second bare bones, except for the pins I would need to do the actual programming.

soldering stuff

ugly but functional

The key was to have both boards up to date enough to function as programmer and target, so I first loaded the newest application versions to each board. The rest was a matter of utilizing the IOIO Manager app on the Android, and letting the programmer do its thing.

two ioios

ginger ale? no.

For reference, the setup was power to power, ground to ground, pins 37|38 to pins 37|38, and pin 36 to mclr…with mclr being on the target board. USB connected to the programmer board…that is that.

Unfortunately, my IOIOSeek app ended up stroking out when I attempted to load the bluetooth library. It works fine with the newest general library version, so I know that my bootloader indeed was a success. Back to the Java drawing board before I can demonstrate the new feature.

Upgrade to CyanogenMod

My relationship with Motorola’s firmware has ended. It was a good run…well, no. That is a lie. It was certainly better after rooting my Droid 2 and wiping out Verizon’s boatware, but the Moto* junk had to go too. I finally decided to gut everything and install Cyanogenmod yesterday.

It is plus one awesome.

Although the process of flashing Cyanogenmod’s firmare involves a little work, it is no more difficult than rooting the phone in the first place. Since I did that a while ago, I really wasn’t concerned with blowing up my warranty…I figured bricking the thing would either result in some sweet haxxing or a new phone. Win / win.

I would suggest an upgrade to anyone. My phone finally screams, as it should have from day one. My battery life is better | everything imaginable is configurable | my apps and Google accounts all work | and, wait for it, I don’t have to kill processes all day. In fact, I don’t have a stand-alone task killer going…that is pretty surreal still.

Well, as with any exercise of this nature, backing up is imperative. Astro File Manager is great…Titanium Backup is great. The other players are the same too…ClockworkMod Recovery makes snagging the MODs easy. I am actually running a daily build, since there is not an official stable build for the Droid 2 yet. No memory leaks though, and everything so far has been functional.

Anyhow, on to the actual firmware stuff. I downloaded the zip file, and booted into recovery mode…

cyanogenmod 7.1 install android

lousy picture is lousy


…during game one of the World Series. Not sure if that is Pujols or Furcal in the reflection. Either way.

Great picture, huh? This is the first time I have used my webcam since upgrading to Ubuntu 9.11. Whoops…screwed up the camera, fellas.

On the screen is a ClockworkMod selection for Google’s bits. I imagine that this was done for legal reasons. Anyhow, I had to go back and install this from recovery, as I missed it at first.

CG7.1 android installation droid 2

Katie's guest cameo


Hi Katie. ^

I also managed to get stuck in a boot loop of sorts during my first attempt. It turns out that I cleared the data but not the cache from the recovery menu. No good. A pulled battery and some troubleshooting and we were good to go.

cyanogenmod boot loop

post boot loop

I spun up the Android market, and did fresh installs of my apps. For the important stuff (the Angry Birds Trilogy, 9 Innings Pro Baseball, et. al.) I pulled the backup data back over top of things. No issues.

I had been wanting a landscaped workspace since I got my phone. .. now I know why…

landscape mode on cm7

at long last

It just makes sense. CM7 allows this to be configured. Like basically everything else. Want your menu on the bottom? Put it there. There are options all over the map…like the camera exposure, for instance.

camera function CM7.1

choice laden

Sweet. It is tough to beat the performance gains in general, but it is wholly possible. Check this out:

Cyanogen Warning Dragons Ahead

here be dragons

One stop overclocking. Disregard that popup and go nuts.

One part of me wishes that mobile carriers would take note of Cyanogenmod’s presence and push Android updates to customers. The other part of me likes to void warranties and do things that the clowns from Verizon frown upon. Either way, my phone is now awesome…that is all that matters.

Android IOIO Project | IOIOSeek

I hope you don’t mind, but I went ahead and stepped it up a few notches.

My newest project brings my end-goal a few steps closer. I now have the pieces in place to put together an actual robotic implementation with the IOIO…since things have officially reached the cool stage, I decided to drop this as a stand-alone project. Complete with pics, a vid, and an app.

IOIOSeek:

IOIO android servo seek

dig the lighting

What I have here are two slider bar controlled servos, an analog input-read solar panel, and some LEDs toggled via a button. The control is via the IOIO / Android.

servos and solar panels on ioio android

dig the wires

The pictures, however nice, don’t really tell the story. Take a look at the video to see this thing in action:

As the video alludes to, I am going to run with this concept. The automation (robotics) lies in the analog reading with respect to the servo positions. I plan to ‘scan’ the panel…that is the piece that is missing. Once I can implement that mess, I will have a tracking system. Implementations will fall out of that.

analog input ioio

+1 tape

As with the last few projects, I have dumped the app on the Android Market for general perusal. The app’s description provides the details of the pin configuration, which is straight forward. I have two PWM outputs, a pure 3.3V digital toggle, and a pin configured for analog input. That is that.

I will push my code to GitHub as well eventually, and provide a link therein. I still need to polish my generic servo code, since my latency was borderline awful in retrospect. Look for that in the near future as well.

As always, drop any questions to joe[at]swantron[dot]com. Feel free to share your IOIO projects with me…