Android phone's sensors

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

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Activity

DIY Robocars via Twitter
How to use the new @donkey_car graphical UI to edit driving data for better training https://www.youtube.com/watch?v=J5-zHNeNebQ
Monday
DIY Robocars via Twitter
RT @SmallpixelCar: Wrote a program to find the light positions at @circuitlaunch. Here is the hypothesis of the light locations updating ba…
Saturday
DIY Robocars via Twitter
RT @SmallpixelCar: Broke my @HokuyoUsa Lidar today. Luckily the non-cone localization, based on @a1k0n LightSLAM idea, works. It will help…
Nov 25
DIY Robocars via Twitter
@gclue_akira CC @NVIDIAEmbedded
Nov 23
DIY Robocars via Twitter
RT @luxonis: OAK-D PoE Autonomous Vehicle (Courtesy of zonyl in our Discord: https://discord.gg/EPsZHkg9Nx) https://t.co/PNDewvJdrb
Nov 23
DIY Robocars via Twitter
RT @f1tenth: It is getting dark and rainy on the F1TENTH racetrack in the @LGSVLSimulator. Testing out the new flood lights for the racetra…
Nov 23
DIY Robocars via Twitter
RT @JoeSpeeds: Live Now! Alex of @IndyAChallenge winning @TU_Muenchen team talking about their racing strategy and open source @OpenRobotic…
Nov 20
DIY Robocars via Twitter
RT @DAVGtech: Live NOW! Alexander Wischnewski of Indy Autonomous Challenge winning TUM team talking racing @diyrobocars @Heavy02011 @Ottawa…
Nov 20
DIY Robocars via Twitter
Incredible training performance with Donkeycar https://www.youtube.com/watch?v=9yy7ASttw04
Nov 9
DIY Robocars via Twitter
RT @JoeSpeeds: Sat Nov 6 Virtual DonkeyCar (and other cars, too) Race. So bring any car? @diyrobocars @IndyAChallenge https://t.co/nZQTff5…
Oct 31
DIY Robocars via Twitter
RT @JoeSpeeds: @chr1sa awesomely scary to see in person as our $1M robot almost clipped the walls as it spun at 140mph. But it was also awe…
Oct 29
DIY Robocars via Twitter
RT @chr1sa: Hey, @a1k0n's amazing "localize by the ceiling lights" @diyrobocars made @hackaday! It's consistently been the fastest in our…
Oct 25
DIY Robocars via Twitter
RT @IMS: It’s only fitting that @BostonDynamics Spot is waving the green flag for today’s @IndyAChallenge! Watch LIVE 👉 https://t.co/NtKnO…
Oct 23
DIY Robocars via Twitter
RT @IndyAChallenge: Congratulations to @TU_Muenchen the winners of the historic @IndyAChallenge and $1M. The first autonomous racecar comp…
Oct 23
DIY Robocars via Twitter
RT @JoeSpeeds: 🏎@TU_Muenchen #ROS 2 @EclipseCyclone #DDS #Zenoh 137mph. Saturday 10am EDT @IndyAChallenge @Twitch http://indyautonomouschallenge.com/stream
Oct 23
DIY Robocars via Twitter
RT @DAVGtech: Another incident: https://t.co/G1pTxQug6B
Oct 23
More…