Hi peeps,

 

Just though It'd best if I mention something I'm doing, perhaps somebody has already achieved this.

 

Practically all Anrdoid phones have a 3DOF accelerometer and a 3DOF magnetometer, the first thing that came to my mind was to use them for robotics!  Reason being i'm a student ie. a little scarce on funds for goodies like 9DOF boards.

 

My goal is to use these sensors for an AHRS or similar, but unfortunatley (I have read) Android is not a real-time OS so isn't suitable for running AHRS code.  So instead  I'm trying to get the sensor data to be spewed out of the phone into an arduino, and for this there's so far 2 solutions i've seen.

  1. Amarino, a fairly complete interface between Android an Arduino using bluetooth
  2. Android SerialPort API, to allow use of the serial ports hidden in the phones

Since i don't have a bluetooth arduino I'm going for number 2.  I have the demo code working, a serial monitor on my phone (like the arduino IDE one), all I need now is to make an app to pour sensor data down the line.  Trouble is I have literally no idea about java and I'm an Eclipse noob, so it's proving hard to do this super simple task :[

 

If anyone could help I'd be real grateful!  I'll post my progress here.

 

note - I know the sensors are a little crappy compared to say the Oilpan - in fact my phone is an LG GW620 which has a Bosch BMA150 accel (i2c, 10 bit-ADC),  and a [chinese] ak8973 mag. (i2c, 8-bit ADC).  Not great. 

Also I'm aware I need a gyro - I've got a 1 axis 20 year old Tokin CG-16DO ceramic gyro (off a Kalt Baron 30 - old school helicopter!), so I think i'll need to upgrade from that :P

Tags: Android, IMU, port, sensors, serial

Views: 176

Reply to This

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service