3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Reverse Engineering =Uzzors2k= Bluecar Android App. Amarino Stuff Too.

This instructable will mostly help people trying to drive/james bond (tomorrow never dies of course) rc cars.  If your just trying to turn on lights, or control your garage with bluetooth from an android phone, there are tons of other, better, easier, faster methods. 


Hello to whoever finds this helpful. This is also my first instructable!

A little bit of my background: I'm a bored teenaged kid that spends way too much time on Facebook and watched way too much James Bond as a kid. Right now i'm listening to a song called Stolen Dog by Burial, it's pretty sick.  ANYWAYS, I'm not in college and I don't have a professional degree in anything. I've been taking C++ classes at a community college/teaching myself C for AVR and have found Arduino to be super easy and super fun and super powerful. The bottom line: If I can do this, anybody can. 

I didn't document my project as well as I should have.

But what I did was modify a RC james bond aston martin car to be controlled by my Android phone. -I was going for a james bond kind of deal. 

I've seen a lot of development between Android and embedded systems lately, which is really cool, cause it's really cool stuff.  

The important part of this instructable is to find the best platform 
    by platform I mean android app, do I want to use amarino, which can only send sensor-accelerometer  data, or do I want to create         my own android app that incorporates buttons and accelerometer data?
But, creating your own app is pretty hard if you don't know a thing about java or android. 
But, using amarino limits you to only using accelerometer data, which is cool, but for me got lame pretty fast. 
Wait, the multicolor lamp uses sliders, I bet somebody could use buttons. I just don't know how to do it, so I might as well use somebody else's work. : )

A while back I came across a GREAT GREAT FANTASTIC website: http://uzzors2k.4hv.org/index.php?page=blucar
Some of the stuff this guy did kind of blew my mind. 
It was hard to understand his website because he compiled his avr microcontroller code with micro C, and for me, I was used to the avr gcc compiler. But I was also not as experienced with setting up a serial port with an attiny. Uzzors also created an Android app to control his attiny. 
I really wanted to either modify his app or reverse engineer it for my own purposes because it incorporates both accelerometer functionality for steering his car and buttons to control the forward and reverse functions. 
I wanted to use Uzzors app with Arduino, because its Arduino, super easy to use, super powerful at the same time.
======================================================================================
I originally wanted to use Uzzors App but I honestly couldn't understand it. I remember thinking, "Oh man, I'm in over my head man!". So I built my car which was all hardware, but I was using amarino to control all the functions. I'm sure you can find a lot about amarino, its pretty cool, but also pretty lame after a while, because you can't create buttons, you can only use sensors. But don't get me wrong, amarino is SICK when you start using it.
I'm just trying to shed some light that I thought was previously out of reach, and I think that Uzzors app seemed out of reach for folks like me!

So what am I saying? You can use Uzzors cool App with Arduino, and not only the Attiny. Check it out on the android app store, search Blucar and your set.

I know nothing about Java. Sucks.  

This is all the hardware stuff: 

 
Remove these adsRemove these ads by Signing Up
 

Step 1Amarino

Amarino
Here's my amarino code if you wanted to take a look. Don't laugh, please just give me some constructive criticism. 
I'm using a rooted HTC inspire. 
go to http://www.amarino-toolkit.net/index.php/download.html for more info.

I was experimenting with the switch case to try and get faster response times. do what ever you want. there used to be an if statement there.

I actually modified somebody's code off the internet, so some things seem arbitrary. (I hope I didn't use that word wrong..)
Your going to have to download the Amarino library for the Arduino IDE off their website. 

#include <MeetAndroid.h>
#include <Servo.h>

MeetAndroid meetAndroid;
Servo myservo;       //controls the steering
Servo motor;            //controls the for/rev motor

void setup()
{
Serial.begin(9600);     //default baud rate for bt module
meetAndroid.registerFunction(phoneorient, 'A');   //use event A in amarino
myservo.attach(9); //servo
motor.attach(8); //forward/backwards motor
}

void loop()
{
meetAndroid.receive(); // you need to keep this in your loop() to receive events
}

void phoneorient(byte flag, byte numOfValues)
{
//Phone Orientation Controller
int values[]={0,0,0};
meetAndroid.getIntValues(values);

// You must hold phone in LANDSCAPE for following orientation.
double x=values[1];     //store x as a double (long decimal number)
int y=values[2];
int z=values[3];
x = (-x);           //my steering was reversed, quick fix
if (x>2)
{
myservo.write(105 + (x-2)*2.5);  //values determined by trial and error for my car
}
else if (x< -2)
{
myservo.write(105 + (x+2)*3.571);  //unique for my car

}
else
{
myservo.write(105);        //unique center steering position
}
/* if (y>=7)
{
//motor.write(180);
motor.write(90 + 25*(y-7));
} */

switch (y)       //tried to use a switch statement so that the motor was faster, reverse is a little glitchy I recommend using the if statement                           //anyways. If you do use the if, change y to a float/double instead of int. 
{
case 9:
motor.write(180);
break;
case 8:
motor.write(150);
break;
case 7:
motor.write(120);
break;
case 6:
case 5:
case 4:
case 3:
case 2:
case 1:
case 0:
motor.write(90);
break;
case -1:
case -2:
case -3:
case -4:
case -5:
case -6:
case -7:
case -8:
case -9:
motor.write(30);
break;
}
/*else if (y<1)
{
motor.write(90 - (y-1)*);
//motor.write(30);
}
else
{
motor.write(90);
}*/
« Previous StepDownload PDFView All StepsNext Step »
8 comments
Jan 15, 2012. 11:01 PMTheNomind1 says:
honestly, using adk is like violation of diy moral code plus no fun at all and expensive. its like u have attiny 13 and its components but u use arduino uno board instead, uzzors must hate it too.

btw, can u list the components of yours and where to get them man? its confusing. where to buy the h bridge and 4 mhz crystal and everything
Jan 20, 2012. 6:07 PMTheNomind1 says:
I intend to build this uzzors car, man, its just confusing to get the parts. Like what is h bridge and where to get it and whats 4 mhz thing in uzzors schematic of this bluecar. And what kind of bluetooth module we should get, this thing is not for newbies this is for intermediates eventhough u made the code digestable by the newbies but the components are no way for the newbies so its only inters who can get this project.
Please list ur components name and how to get them, man, u have made the code to be "newbie"-enabled but the components are still not newbie reachable.
Nov 6, 2011. 12:25 PMareddy8 says:
Hi friends.... recently I started to work on a project in which I have to use the accelerometer data of android and send it via bluetooth to my computer into a data sheet..... where a program uses the data to control my robot
I have installed the java prog version of android
can you guys tell me how to access the accelerometer in JAVA and bluetooth module to send data??
thanks a lot
Jul 18, 2011. 5:52 PMpcdevltd says:
Hey thanks for sharing that - good to see other people working on Android-Arduino interfaces. I highly recommend looking into the ADK. Good luck with your future projects!
Jul 18, 2011. 7:14 PMpcdevltd says:
You have a good point, and also (I think more of a deal-breaker for some) is that you need to have the right Android version - either stock 2.3.4 or 3.1 or later. That cuts out huge numbers of would-be Android hardware hackers. Having said that, they make it pretty easy for anyone to get into it, and they are committed to support it in the OS for all future releases which is always a good thing. It literally becomes a plug-and-play technology - you can even tell the OS to go to the market and download your app when the hardware is plugged in, if you don't have it installed already. Anyway, not to dissuade you from your current projects, well done and keep it up!

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
1
Followers
1
Author:robwasab
I like cheezy music and cheezy movies.