To load the software on your Android device you will need to enable loading applications from unknown sources by following the instructions at this link.
Download the SmartShaker.apk file to your Android device from the following link:
With power applied to your project hardware, connect the USB OTG cable to a USB mini or micro cable which is connected to your Arduino. Run the Smart Shaker application (it will have a green star as an icon) and follow the instructions to make a drink. Watch the second half of the video from the overview for an example of using the project with a USB connection.
Note: As mentioned in the previous step, if you also have a Bluefruit EZ-link attached to your hardware make sure to disconnect it before using the USB connection. Also on an Arduino Nano it might be necessary to disconnect the Vin power line to the Arduino so it is powered from USB instead of the power supply.
- Google's Android Developer webpage
- Google's Android Training tutorials
- Android tutorials from vogella.com
For the USB communication, this project uses the usb-serial-for-android library which is a great wrapper around USB to serial communication for Arduino and common FTDI chips. I've included the source to this library in the application and made a few small changes to it:
- Added an InputStream and OutputStream implementation to better integrate the USB serial device with other Java classes.
- Added a function to enumerate all the USB devices which are supported by the library. The default device enumeration function in the library requires permission to all the attached devices which is not really feasible for use in a device selection list.