Adafruit’s Mike Barela has put together a detailed tutorial on programming the Atmel-powered Arduino Uno board (ATmega328) with Android and Windows tablets. As Barela notes, creating on the go for both hobbyists and engineers gets easier every year.
“Tablets with modern versions of the Android operating system can be found below $200. In addition, there is a new crop of modern tablets powered by the Intel Bay Trail CPU [that] run full versions of Windows 8.1,” writes Barela. “With a full Windows system, you have the gamut of developer tools at your fingertips. The Arduino IDE runs well and you can access code from the web, from the cloud, or locally. With Android, you cannot directly install code from the Arduino project as Android is not a supported operating system. [Nevertheless], there are programmers porting the Linux versions to Android.”
The most common method of communication between a micro controller and tablet (or PC) is via a USB port and OTG (on the go) cable. The cable – which is available in Adafruit’s shop – allows the tablet to communicate with external device. Click here to learn about linking with Bluetooth.
“For an Arduino Uno, you can then use the regular (or 6 inch) A to B cable. Other boards may require mini or micro USB cables,” Barela continues. “The OTG cable provides a standard size A socket, making mating cables straightforward.”
Drivers for nearly any Arduino are available for Windows, although some work may be necessary to install unsigned drivers for the Uno. A number of tablets may provide provision to enter recovery and allow unsigned drivers, a procedure documented here. Arduino software can be downloaded from the official Arduino site, while version 1.05 is available from Adafruit with integrated support for the Atmel-powered Flora, Gemma and Trinket.
“Once the IDE is installed, click the desktop icon to get to the Windows desktop. Double-click the Arduino icon and you will be in the development environment. Load the included Blink sketch by clicking File then Examples then 01. Basics then Blink. A new window opens with the Blink software sketch,” Barela explains.
“Ensure your OTG to Uno cable from the previous section is connected from the tablet to the Uno. The Uno should have the power LED on, powered from the tablet. Use an external power supply for the Uno to save tablet battery life. Set the environment for download by clicking Tools, then Board, then select ‘Arduino Uno’ from the list. Go back to the Tools Menu, then Serial Port, then you usually select the last port.”
To upload the above-mentioned Blink sketch to the Uno, select the right arrow icon. The yellow LED neat the Uno’s Pin 13 should begin blinking. In terms of Adafruit’s Trinket and Gemma, Barela confirms a Windows tablet will recognize the Atmel-powered platforms, although the USBtinyISP driver must be installed.
The Arduino team does not officially publish native Android versions of the Arduino IDE, although Anton Smirnov has coded ArduinoDroid which is available from the Google Play app store (free ad-supported, ad-free is $2.99).
“You will need a microUSB male OTG to A female cable available from Adafruit and mobile shops at a reasonable price. This will provide you a full A male connection to plug in a cable to fit your microcontroller. For our Uno example, a standard USB A to B cable (Adafruit sells long and easy to pack short versions),” says Barela.
“You may want to power the Uno from a separate power supply – if you use USB power, it will shorten your tablet battery life depending on the current draw and could exceed the power that can be drawn if you connect shields or other devices.”
In terms of loading a program, users can download their own code via USB (like a flash drive), from Google Drive to a local folder or by cutting and pasting from a browser. Simply select Sketch, then Open and select a recent sketch from the device or from Dropbox.
“The text is color-coded and is edited like any text file.You can upload your sketch to the Uno by getting the menu using the … icon, then Actions then you can Verify/Compile. Once it compiles cleanly use the same menu to select upload,” Barela concludes.
Interested in learning more about programming Atmel-based Arduino boards with Android and Windows tablets? You can check out Adafruit’s official tutorial here.
I have tried android app to program Arduino Uno via bluetooth, simply by adding Bluino_Shield to your Arduino Uno. This link app https://play.google.com/store/apps/details?id=com.bluino.bluinoloader