Mobile Sensor
March 31st, 2009. Filed under: arduino, processing, programming.
Nik and I created this mobile sensor that broadcasts light levels and accelerometer data to an online database via text message. The above visualization was created by running around for five minutes. Light levels are represented by the opacity of blue and faster changes in tilt (when one is running with the sensor in hand, for instance) are represented by longer lines.
We are currently working on a proper write up that will include code and schematics.
May 6th, 2009 at 8:43 pm
Cool project. Great choices in your components. 😉
June 4th, 2009 at 9:02 am
I’ve been thinking about building this for a while now but haven’t been able to get my feeble brain around how to do the mobile bit – talk of ATT commands scared me off.
Be great to know what mobile phone you used, and how 🙂
Mike
June 4th, 2009 at 9:19 pm
@Mike: until we do a proper write up, nik’s post might help you since it includes links to the phone and the code we modified: http://nikhanselmann.com/index.php?/experiments/arduino–motorola-c168i/
and remind me if i haven’t released schematics and code in the next couple months
June 6th, 2009 at 9:33 am
@Nick – nice one, thanks loads. Will check out the post and call back in a bit. Interesting that you went for the c168i – I spotted the serial2mobile thing but wondering if anyone has had success with cheap nokia’s..
Cheers
Mike
July 24th, 2009 at 12:07 pm
How did you physically connect the 168i to arduino? To be more specific, what voltage does the arduino have to output to successfully communicate with the phone via its stereo jack? Could you email me a schematic of just that connection? thanks
July 24th, 2009 at 12:17 pm
You don’t send power to the phone. You use a mini stereo jack with the sleeve connected to the Arduino ground, the ring connected to the Arduino RX and the tip connected to the Arduino TX (instructions on this page).
We’re working on the full schematic/instructions for this project which we should have available very soon!
July 24th, 2009 at 12:25 pm
Thanks for your quick reply!! when i hook up as described the phone’s display only lights brightly… it does not seem to be responsive. The brightening of the screen made me think that the output from arduino was too much and that i needed some resistance…. any thoughts would be appreciated. Thanks again
April 2nd, 2010 at 10:20 am
hi there
i am so interested with your blog, doing arduino project.
i have did once but have trouble in connect between database and arduino. my arduino isnt get the data from the DB. im wondering on how you pull the data from DB to your phone?
April 6th, 2010 at 11:25 am
the arduino doesn’t connect to a database, it only sends a command to the phone to send a text message. the text message goes to an email address, which is then added to the database.
if i were to do this project again, i would either have the phone send a text message directly to an email address or have it send a text message to a dedicated google voice or 3jam.com phone number, which is then forwarded to an email address. i would then parse the emails using a python script which adds the info to a text file, thereby avoiding using a database.
parsing email using python is explained here: http://docs.python.org/library/poplib.html and only requires a short bit of code, something like this:
import getpass, poplib
M = poplib.POP3('localhost')
M.user(getpass.getuser())
M.pass_(getpass.getpass())
numMessages = len(M.list()[1])
for i in range(numMessages):
for j in M.retr(i+1)[1]:
print j
hope this helps!