• Nov 23, 2013: SensoDuino 0.160 gets a face left.  
  • Nov 19. 2031: OPINION: The Amazing Synergy Between Arduino & Android.
  • Nov 19, 2013: SensoDuino 0.159 is out. Android phone date (y,m,d) and time (h,m,s) are supported as sensors. Support for Android KitKat (4.4/API 19). 


Think of SensoDuino as having over a dozen virtual shields for your Arduino each providing a function or feature such as GSM, GPS, Gyro, etc but without having to stack or wire these components. SensoDuino is a free Android application that captures data from sensors built into your Android mobile device then transmits the data over the HC-05 Bluetooth module to Arduino Uno or any device with serial Bluetooth capabilities such as a Windows PC, Mac, or Bluetooth equipped microcontroller. SensoDuino also saves the captured data to a comma-delimited text file.  This app has been tested and designed for the HC-05 Serial Bluetooth module. Other Bluetooth modules may or may not work. Please refer to comments by users who tried other Bluetooth modules with this app. 

You can install SensoDuino from Google Play only. 


You can control the frequency of sensor data reading, transmitting, and logging (subject to the specifications of the sensor vendor.)  This is my second Android app for Arduino Uno. You might also be interested in my first app Andruino  which is a simple 2-way Bluetooth-based Android controller for Arduino Uno.

SensoDuino eliminates the need for USB Host hardware for your phone or Arduino Uno. For Arduino Uno or microcontroller, you only need a $10 HC-05 Bluetooth module (or equivalent).  

Save over $200 in sensors and parts for your Arduino Uno or microcontroller project, if you already have a mid-range Android device such as my Samsung Galaxy II Plus. See section titled: Android: A Capable Electronics DIY Platform.


SensoDuino recognizes the following Android sensors: GPS, Orientation, Gravity, Rotation Vector, Gyroscope, Accelerometer, Linear Accelerometer,  Magnetometer, Light Level, Audio Level, Proximity, Pressure, Temperature, and Relative Humidity.

Some software (virtual) sensors relay on the presence of hardware sensors to function. For example, the gravity sensor, linear acceleration sensor, and rotation vector sensor all of these software sensors relay on the presence of hardware gyro sensor on your Android device to function.  
SensoDuino also features an Android sensor scanner that will list hardware and software sensors supported by your Android device as well as key sensor specifications such as max power consumption, resolution, vendor, etc.  Some Android devices have duplicate sensors from different vendors. The Android SDK will return the default sensor.

  • Reads Android sensors. 
  • Saves sensor readings to comma-delimited text file. 
  • Transmits readings in ASCII comma-delimited format via Bluetooth. 
  • Lists your Android device's built-in sensors both hardware and software (virtual sensors). 
  • Set speed of sensor data capturing, logging, and transmission from 100 milliseconds to 10 minutes (subject to sensor limits). 
  • Keeps track of accuracy for logged sensor readings and provide visual clues for inaccurate sensor data. 
  • Geo-tags sensor readings using your Android device GPS.
  • Optimized for speed of operation and transmission. 
  • Keeps device awake to prevent loss of sensor data logging. 
  • Scan and list available sensors in your device and their specifications.

With the help of Arduino or other microcontrollers, SensoDuino can be used in robotics and UAV guidance. Its support for 12 motion and environment sensors covers a wide range of sensory feedback. Also, SensoDuino can be used for logging. The ability to set the speed of logging from 10Hz to once every 10 minutes allows for high-speed as well as time-lapse logging of sensor readings.


Bluetooth-controlled Pan/Tilt Servo Platform Using Android (SensoDuino) & Arduino

IR Remote Control Station for SensoDuino


Special thanks to colleagues from PIN13 Protospace who helped with testing, usability, guide review and proofreading. Mainly, I wish to thank Jafar Quttaineh for his detailed product testing and for his invaluable insights and feature suggestions. Also thanks to Mujahed Al-Tahle for his detailed analysis and testing of the product and guide.


This is a free app and only through your ratings can I determine if it's worth supporting or discontinuing.

Step 1: How to Use SensoDuino

SensoDuino is very simple to use. Basically you have rows of sensor names (number of sensors may change in the future). Each sensor has three checkboxes next to it labeled On, Tx, and Log:
  • ON: The first checkbox  turns the sensor On or Off which means SensoDuino is either reading this sensor or not.
  • TX: The second checkbox when enabled, SensoDuino will transmit the associated sensor readings via Bluetooth to any paired and connected Bluetooth serial device.
  • LOG: When the third checkbox is checked, the associated sensor readings are logged to a comma-delimited text file named "sensoduino.txt" in the root of your Android's SD card.

You can control the speed of sensor reading from the Preferences menu. You have a choice between 100 millisecond (10 Hz) to 10 minutes. The speed of the sensor is subject to the limits of the vendor specifications. Most GPS sensors today generate location data once per second (1 Hz). Some GPS modules generate location data 10 times per second (10 Hz). On the other side of the speed spectrum, some sensors generate readings over microseconds.


Motion sensors (gyro, accelerometer, magnetometer) are sensitive to environmental conditions such as presence of magnetic field or slight physical vibrations. So even when your phone is placed on a flat stationary surface, you will still see changes in sensor reading affecting mostly the least significant digits. The least significant digits of motion sensor readings may produce more data than you need for your application. Your application requirements should determine how many digits will be truncated or kept.


SensoDuino is a power-hungry app. Between active sensors, Bluetooth transmission, logging to device storage, and keeping your device awake so as not to interrupt sensor readings, you are bound to drain your battery. 

For prolonged use of SensoDuino, an additional power source should be considered either in the form of power brick, solar/wind energy, or power outlet if one is available.

There are many tips on the web on how to conserve your mobile device's battery power that could extend your SensoDuino logging time significantly.

For example, enabling Airplane Mode on you device can save battery power. Different vendors use different names for Airplane Mode such as In-Flight Mode.
<p>hi.</p><p>I tried installing SensoDuino from Google Play Store on my mobile. Unfortunately, it says that my device is not compatible. I use Samsung Galaxy Note Edge (SM-N915G). The phone runs Android 6.0.1</p><p>I have emailed Hazim Bitar a couple of days ago, and am awaiting response.</p><p>Does anyone in this forum face this issue, especially with newer smartphones / Android OS versions?</p>
Very smart and useful app!<br>Thank you.
<p>Thx for nice app, a little script to export SensoDuino log to RabbitMQ - <a href="https://github.com/fxpester/androidSensors_to_rabbit" rel="nofollow">https://github.com/fxpester/androidSensors_to_rabb...</a></p>
<p>Thanks alot for nice sharing! I have got much clear idea regarding from this useful information.</p>
<p>hi there</p><p>i just wanted to know as like sensor data can we also send our android UUID to oure serial port bluetooth.</p>
<p>hey friend,</p><p>is it possible that the APP tranamits the data while the camera APP is open? </p><p>Best regards </p><p>Georg</p>
<p>shall we use two sensor at a time .. if it possible give the code</p>
<p>Can this app work for raspberrry pi 2</p>
<p>can we use sensoduino in avr microcontroller. Please reply as soon as possible. thanks in advance.</p>
<p>please reply me as soon as possible</p>
<p>Hello</p><p>I made it even if I have made several mistakes. Here some advices:</p><p>First mistake, I have bought a hc06 in place of the good one the hc05 !</p><p>Secundly I upload the sketch during the connection to the bluetooth connection: please remove your bluettoth before transfering</p><p>Thridly I have forgot to modify the sensoduino to get output on 9600 baud and not 115200 !</p><p>Bravo to the TechBitar !</p><p>First mistake bought a HC-06 in place of a HC5</p>
E at pontifexpetrovich@gmail.com
E at pontifexpetrovich@gmail.com
Hi techbitar, pls help me regarding my thesis. I need to create an app that utilizaes the ambient temperature sensor of the phone then transmits the data received to an arduino. Also the app needs a control interface like a remote control for an inverter type aircon.
<p>Hi! Did you ever try SensoDuino with HC-06 Bluetooth module?</p>
<p>Hello I have tried without any success. See my post.</p>
<p>At first, prima for the done jobs: itt is totally unbeliveable</p><p>I was previously a biocomputer scientist. I am trying to learn arduino and embedded system.</p><p>I have tried your app sensoduino. I have an arduino uno and a bluetooth module (jy-mcu, v1.06). I have paired it with a sony ericons smartphone.</p><p>The red light in the bluetooth board is now continuoulsy red. The Tx led of the arduino is flashing/blinking.</p><p>But baddly in the serial terminal, it never go down to the condition if(getChar != START_CMD_CHAR) return;</p><p>so it newer print anything about the sensor, that are On with Tx activated...</p><p>any idea why?</p><p>Thanks </p><p>Francois, from France</p>
<p>I have forgotten to precise that the module bluetooth seems to be named HC-06</p>
<p>Could this application show readings from a sensor connected to the Arduino?</p><p>Thanks in advance.</p>
<p>hello... i have a an arduino mega 2560 a bluetooth module HC-05 and a galaxy s4. the problem is that, to watch the data received from the phone to the serial monitor of arduino i have to constantly press the reset button of the arduino. please help me...</p>
<p>Hey friend did you solved how to do that?... I'm in the same problem</p>
<p>how can i use it with a raspberry?</p>
<p>Does this app still transmit data when running in the background (ie. hit the home button after syncing)?</p>
<p>Thank you Hazim for the app, and excellent and clear ideas. I have just ported SensoDuino into BB10 and planning interesting projects. </p>
<p>hello! </p><p>I am planning on working on a project using SensoDuino and an old android phone, just wanted to know what is the oldest platform of android that this app is compatible with?</p>
<p>Great Job! I've got my senso' ! whens GPS n some of the other N/A's available?</p>
<p>I have a problem</p><p>I am unable to establish communication between the HC-05 to the arduino </p><p>The HC-05 transmit data but the arduino didt get that</p><p>/*</p><p> PROJECT: SensoDuino 0.17 </p><p> PROGRAMMER: Hazim Bitar (techbitar at gmail dot com)</p><p> DATE: Sep 30, 2013</p><p> FILE: sensoduino.ino</p><p> LICENSE: Public domain</p><p> */</p><p>// Replace sensor numbers with Names</p><p>#include &lt;SoftwareSerial.h&gt;</p><p>#define START_CMD_CHAR '&gt;'</p><p>#define END_CMD_CHAR '\n'</p><p>#define DIV_CMD_CHAR ','</p><p>#define DEBUG 1 // Set to 0 if you don't want serial output of sensor data</p><p>SoftwareSerial mySerial(3, 2);</p><p>String inText;</p><p>float value0, value1, value2;</p><p>void setup() {</p><p> Serial.begin(115200);</p><p> mySerial.begin(115200);</p><p> Serial.println(&quot;\nSensoDuino 0.13 by TechBitar.com (2013).\n&quot;);</p><p> Serial.println(&quot;Android Sensor Type No: &quot;);</p><p> Serial.println(&quot;1- ACCELEROMETER (m/s^2 - X,Y,Z)&quot;);</p><p> Serial.println(&quot;2- MAGNETIC_FIELD (uT - X,Y,Z)&quot;);</p><p> Serial.println(&quot;3- ORIENTATION (Yaw, Pitch, Roll)&quot;);</p><p> Serial.println(&quot;4- GYROSCOPE (rad/sec - X,Y,Z)&quot;);</p><p> Serial.println(&quot;5- LIGHT (SI lux)&quot;);</p><p> Serial.println(&quot;6- PRESSURE (hPa millibar)&quot;);</p><p> Serial.println(&quot;7- DEVICE TEMPERATURE (C)&quot;);</p><p> Serial.println(&quot;8- PROXIMITY (Centimeters or 1,0)&quot;);</p><p> Serial.println(&quot;9- GRAVITY (m/s^2 - X,Y,Z)&quot;);</p><p> Serial.println(&quot;10- LINEAR_ACCELERATION (m/s^2 - X,Y,Z)&quot;);</p><p> Serial.println(&quot;11- ROTATION_VECTOR (Degrees - X,Y,Z)&quot; );</p><p> Serial.println(&quot;12- RELATIVE_HUMIDITY (%)&quot;);</p><p> Serial.println(&quot;13- AMBIENT_TEMPERATURE (C)&quot;);</p><p> Serial.println(&quot;14- MAGNETIC_FIELD_UNCALIBRATED (uT - X,Y,Z)&quot;);</p><p> Serial.println(&quot;15- GAME_ROTATION_VECTOR (Degrees - X,Y,Z)&quot;);</p><p> Serial.println(&quot;16- GYROSCOPE_UNCALIBRATED (rad/sec - X,Y,Z)&quot;);</p><p> Serial.println(&quot;17- SIGNIFICANT_MOTION (1,0)&quot;);</p><p> Serial.println(&quot;97 - AUDIO (Vol.)&quot;);</p><p> Serial.println(&quot;98 - GPS1 (Lat., Long., Alt.)&quot;);</p><p> Serial.println(&quot;99 - GPS2 (Bearing, Speed, Date/Time)&quot;);</p><p> Serial.println(&quot;\n\nNOTE: IGNORE VALUES OF 99.99\n\n&quot;);</p><p> Serial.flush();</p><p>}</p><p>void loop()</p><p>{</p><p> Serial.flush();</p><p> int inCommand = 0;</p><p> int sensorType = 0;</p><p> unsigned long logCount = 0L;</p><p> char getChar = ' '; //read serial</p><p> // wait for incoming data</p><p> if (Serial.available() &lt; 1) return; // if serial empty, return to loop().</p><p> // parse incoming command start flag </p><p> getChar = Serial.read();</p><p> if (getChar != START_CMD_CHAR) return; // if no command start flag, return to loop().</p><p> // parse incoming pin# and value </p><p> sensorType = Serial.parseInt(); // read sensor typr</p><p> logCount = Serial.parseInt(); // read total logged sensor readings</p><p> value0 = Serial.parseFloat(); // 1st sensor value</p><p> value1 = Serial.parseFloat(); // 2rd sensor value if exists</p><p> value2 = Serial.parseFloat(); // 3rd sensor value if exists</p><p> if (DEBUG) {</p><p> Serial.print(&quot;Sensor type: &quot;);</p><p> Serial.println(sensorType);</p><p> Serial.print(&quot;Sensor log#: &quot;);</p><p> Serial.println(logCount);</p><p> Serial.print(&quot;Val[0]: &quot;);</p><p> Serial.println(value0);</p><p> Serial.print(&quot;Val[1]: &quot;);</p><p> Serial.println(value1);</p><p> Serial.print(&quot;Val[2]: &quot;);</p><p> Serial.println(value2);</p><p> Serial.println(&quot;-----------------------&quot;);</p><p> delay(10);</p><p> }</p><p>}</p>
<p>Hi sir i'm doing my project based on sensoduino using my android accelerometer sensor for driving toy helicopter(like your pan/tilt servo).Can you please help me with coding???</p>
this is going to work perfectly for my S4 Active on my UAV project with my two pals
Can i send the Android Phone's data to the pc?if can do it,what is sofrware i would used in the pc?
it depends on what you plan to do with the data on the PC. If you just want to display it, a terminal emulator like Tera Term running on your PC will do. if you want to parse the info and process it you use the sample code I provide with the SensoDuino project info. but you can log, plot, parse, etc the sensoduino data on the PC.
where i can download the last version apk?
that's great <br> <br>if i want to use arduino mega 2560.what are the changes to be made?
I don't have an arduino mega 2560 to test with but give it a shot and see if it works as is. judging from the 2560 's spec sheet I don't expect any major tweaking but I have been proven wrong before.
thanks <br>
Right what I needed! <br>Can I put the phone down at a random position and set values to zero for that position?
One way to achieve something similar is to have your receiver application be it on PC or Arduino read and save sensor readings from your SensoDuino as initial sensor values. Then deduct these saved initial values from new sensor readings. For example if you start your app and it get from SensoDuino a GPS Yaw of 60, then every new Yaw value will get 60 deducted from it to give you the delta of the two values. So if next SensoDuino GPS reading gives a Yaw of 90 then the difference is 30. This is one way to &quot;zero&quot; your SensoDuino readings.
Well, that I've thought of myself, but still thanks! :) <br>The use I have for this is such that I need to log it to phone first and later just do some work with the data on PC alone. It wont be a big deal to just take starting positions and deduct those from every other position in Excel (I hope). <br>I've written a review on GPlay as well now with another issue - the app stops logging data when you turn the screen off. Given that my logging times are mostly 2 hours + I might have some issues regarding battery life and some accidental hitting on screen as well, can you do something about it? <br>Other than that the app does the trick for me even despite I log my postitions using accelerometer because gyro is not present on my phone. Exporting the log to Excel is quite easy too. <br>Thanks! :)
Hi Raitis, I replied to your comment on Gplay. Thanks for the rating :) <br> <br>I will look into ways to extend the battery life in future versions. I have not tried it yet but maybe enabling Airplane mode if your mobile supports it can save additional power, if you don't need to be connected to the mobile network while logging. Thanks for the suggestions and rating.
You're worth the rating! <br>I kinda thought about using the airplane mode, since was not sure if let's say an incoming call would not stop the logging process as well. <br>Thanks for the effort!
FYI, I added the Accelerometer sensor to the latest version of SensoDuino. Before, I had the Linear Accelerometer only.
Great job. We send the data to the mobile phone ;) http://www.youtube.com/watch?v=tOm5aNRvX0Q
Nice! Thanks for sharing.
This program is fantastic! Is there a way to send the accumulated data to an email address on a set schedule using the phone's wireless access? If so perhaps it might be a future feature. I think that would make this the perfect piece of software for me.
Thanks for the good suggestion. I will add it to the feature request list.
This is exactly what I was looking for! Thank you ever so much :-D
You're welcome. Glad to hear it.
This is a very interesting way to use old smart phones to share sensors and comms
an Android phone, when paired with let's say an Arduino Uno, is a very cost effective DIY platform when compared to other bare-bone palm-sized ARM SoC solutions such as raspi after you add basic sensors and comparable features to the latter.
Hi, first i would like to say i really like how you connect between arduino and android. <br> <br>My question is how to get started in programming android? what are the programming language used?

About This Instructable



Bio: Did I unplug the solder iron?
More by techbitar:IR Remote Control Station for Android - TURN THE TV DOWN SensoDuino: Turn Your Android Phone into a Wireless Sensors Hub for Arduino Modify The HC-05 Bluetooth Module Defaults Using AT Commands 
Add instructable to: