Hardware Reference
In-Depth Information
When you run this sketch on an Android device,
it will try to connect. When it succeeds in doing
so, it will check for new readings every 10
seconds. It will then attempt to send those to the server
every two minutes. It doesn't check that it got a valid
response, however; that is left as an exercise for you.
like they do on your computer. However, Google decided
that you might want to develop USB accessories, so they
recently announced the Google Accessory Development
Kit, an open hardware platform for developing USB acces-
sories for Android. The Accessory Development Kit is
based on an Arduino Mega 2650 with a USB Host shield
(originally designed by Oleg Mazurov of www.circuitsath-
ome.com ) built into it. Circuits@Home sells a few good
variants on the USB Host shield: for the standard Arduino
shield form and for the Mini Pro. The Arduino Store carries
the Arduino Mega ADK, and a Processing for Android
library is in development. Several others are in the works
from different companies, so by the time you read this,
you'll have lots of options.
X
Armed with this much, there's a lot you can do with Pro-
cessing for Android. You've got the ability to contact the
Internet and to contact local devices wirelessly. You can
also contact the built-in sensors, of course. The phone is
now your hub to connect a whole lot of things.
What About USB?
Android devices are normally USB end devices, not USB
hosts. So, you can't plug an end device like a mouse, a
keyboard, or an Arduino into them and have them work
Figure 10-25
The datalogger sketch.
Figure 10-26
The datalogger hoodie in action. How excited is he to be
wearing it? Check his GSR readings online to find out!
 
Search WWH ::




Custom Search