About

Showing posts with label adk. Show all posts
Showing posts with label adk. Show all posts

11/3/12

Rover 5 with pan-tilt kit,breadboard and 2 servos mounted

Some more pictures of mounting a pan tilt kit on a Rover 5.

The robot chassis base plate is on a 50 mm standoff to utilize the mounting holes for a servo instead of getting a second multi-purpose bracket. Saw this on a YouTube vid. Follow the "0.1 assembly guide" that comes with the kit (and is the only one produced) as far as you can get without fastening things much, then take a look here if you need. I had to google pretty hard to find some pictures and a short video snippet, but it's out there. The kit also does not come with enough screws to mount it this way. You are supposed to get an extra MP-bracket, they come with the screws too.

HERE is the images I can find. The ones you can see on this page are my own.

These are not mentioned in the assembly instructions
and many people seek help for this kit, but it's supposedly
agreed on that this is how you do it.

Then, on the multi+bracket, put them in like this.
This will fit quite nicely. Not so much with the U-bracket.
Make sure you don't fasten the center screw until the
servo is centered. Then you can take it off, and re-position it.
Here you can also see the positions for mounting
the Arduino base plate (here with Mega ADK and breadboard)
Make sure then, that you can twist it as much as you want in each direction
Try it out. When assembling, keep using two screws to
test out that you can rotate (slowly!) the servos
The standard servos goes up to about 150 degrees
from the data sheet, but mine almost does 170 or so it seems.

Then fasten center screw

I found that there are two holes drilled in the base plate and they
actually fit quite nicely on the Rover like this.
I found some slightly thinner stand-offs from a
computer with long screw length and short stand-off length
that went nicely trough the holes after trying first with
thinner screws. (the pointy ones, I just randomly picked it from
an old computer as well)
Before the camera was out of power, I didn't get to
take a picture of how i stabilized it completely. I'll post that later. There was
a hole quite far to the left that I put in an M3 standoff with a screw
in and put on the nut. It then just sled into the outer ridge under the
breadboard. I'm pretty sure it's not supposed to be done this way
but it worked well for me.
Two 9V batteries, supposed to be taped in here
on opposite side of the breadboard to counter weight.
The 6xAA battery pack also helps putting
center of weight down a bit. 

10/29/12

More Rover 5 progress

As you can see, short stand-offs are too small to mount the servo in the hole.

This is as far down as possible with battery mounted

So while there are still nothing moving here, I'm working on a little OS to control the rover. It will be a breadboard button system:


Here the two buttons are essentially a
2-button keyboard for my Rover 5 OS
Menu selection using a potmeter!

OS screenshot
Clicking button 1 will activate temperature readouts to the LCD
Clicking button 2 works as a 'back' button

Pre-broken pushbutton from the Sparkfun Inventors Kit.
I still managed to get it working with some creative wiring :/


Here's the setup so far. It's basically half the SIK projects on the
same breadboard, all rolled into one 7K 'OS'
As you can see, that is all on an Uno, using all digital PWR but #7. So I just moved the project over to my new Android Mega ADK board, and it worked just the same. Both the Uno and the Mega will run the Rover eventually.

10/26/12

Setting up an Android development environment

Books to read

Apress, Beginning Android 4 (2012) - Comes with source code available here
Although it says it's for Android 4.0, the book uses 2.2 but also tells the reader how to adapt to frameworks you don't actually develop for. Very clear and informational, and had me writing code in just a few minutes.

Addison-Wesley, The Android Developers Cookbook (2011)
Has the same clear style as the above one, with simple XML snippets and the code to support just that. I don't like tech books that wants you to build a huge application, when all you needed was an explanation for how to use a certain GUI element on page 76.

Software to get

Decide if you want Eclipse SDK 3.8 or 4.2. The 4.x series will eventually be better, but 4.3 won't be out until June 2013. 4.2 has a new internal UI engine. Meanwhile, the 3.x series is more than sufficient and also very fast. I also  keep my OS on an SSD drive, and my development stuff on a RAID0 disk. That does help when you are dealing with large Java environments. 



Setting up the environment

Download Android SDK here. This is the toolkit needed to link Eclipse to you Android phone, or to start up an emulator. You can set most Androids up to push debug messages trough the USB. These messages will appear in the debug console in Eclipse. This is generally not needed during normal app development. If you look trough the log you will see hundreds of notices about battery state, memory and the likes.


From the SDK Manger, you can download the API's and tools you want to target for. Some of the API's for the more esoteric phones require that you have a login at their respective manufacturers development network. You can safely cancel the ones you cannot download.


In the AVD (Android Virtual Device) Manager, you set up virtual machines that emulate the platform you want to develop for.

You create the project in File->New->Other->Android Application Project.


Now, all you have to do is to make a Run-configuration for your Android project. 


If you got this far, you should pretty much be able to run a skeleton application on your own USB connected phone 

Hardware and specs

I use a Samsung Galaxy Xcover GTS5690 for development. That is pretty much an S2 stripped of a CPU core and has less memory and smaller screen (a 'medium' class screen in phone terms, 320x480 or 480x320 rotated). Some programs even identify it as an S2. This phone has 512MB RAM, single core Marvell ARMv7 @ 800Mhz and a Marvell GLES2.0 chip as well as some yet unknown hardware for video playback of some formats. I have a 8GB SDcard stuck in it as well. 

While not high end, a quick survey among friends suggest the 2.x series Androids will be around for a long time. Samsung is even still making BIOS updates to this phone as this were written, and a mid-end dev system could be a good exercise in resourse management. Many people out there has low-end older phones as well as mid-end ones.

Flexibility across devices

Android was written with the fact in mind that devices will be different, so it has built in flexibility to handle this. Some things can be done even better with minor effort from the developer, such as simply targeting for a higher level API will enable functionality for adapting to 4.x enhances features.

Targeting a 2.2 device would cover 93% of the market. It seems the 1.x series is pretty much obsolete. Also, the changes from the 2.x to the 3.x and 4.x series seems to be smaller compared to the leap that was from 1.x to 2.x. Not having developed on 1.x, I cannot say for sure, but telling from the literature, most of the features people were missing in 1.x got generously implemented in 2.x. 

Messing up is easy

It's really easy to mess up an Android project, so keep your CVS up and running.