As an open source electronic platform, Arduino boards are very popular for IoT projects. While the standard way to use them is to connect the Arduino's USB ports to a computer, you can also do this using a Bluetooth controller and Android apps. In case your computer is not available for powering up Arduino boards, an Android phone is the best option available.
Essential components
You will need the following components to prepare this setup:
1. OTG cable: A standard OTG cable with USB 2.0 for older Android phones. For newer smartphones equipped with Type-C ports, an OTG cable with Type-C ports is required.
2. Data transmission cable: a data transmission cable with USB 2.0 male to type B USB 2.0 type A connector for further connections.
3. Arduino Uno board: you can use any other card Arduino.
4. LED: will be used to test the connection. You can also use a servo motor or whatever else you need to test.
5. Arduino app for Android: While there are some decent apps, it's relatively easy to work with ArduinoDroid. It's a heavy app (210MB), so a decent amount of phone storage space is required. Also, the app cannot be saved to an SD card.
6. Miscellaneous: You will also need a breadboard and some connection cables to connect to it. Some resistors are needed to divide the voltage.
How to assemble
The installation of the Arduino-Android assembly is very simple and does not require many steps.
- Connect the USB type A male plug to the USB female of the OTG cable which goes further to the smartphone.
- Connect the USB type B plug to the Arduino board.
- Use the connector cables to join the LED on the breadboard to the Arduino Uno board. The precise location of the connectors on the Arduino Uno is determined by the code provided by the app. (See the next section for that.)
A rough assembly should look like the one in the figure above.
Using the ArduinoDroid app
Once you have downloaded and installed the app on your phone, go to the home screen and click on the three-dot menu icon.
Next, go to “Settings”, followed by “Board type” and “Arduino”.
In the next step you have to choose "One" as the card type. Depending on the type of Arduino board you are using, you can choose from many other options.
Again, go to the three-dot menu and select “Sketch” followed by “Example”. There are many examples. For LED lights, you just need to go to "Basics" followed by "Blink".
Automatically, the code for the blinking LED is visible in the Editor screen.
The code says the Uno board should be connected to digital pin 13. Go back to the previous section, “How to Assemble”, to plug the LED connector cable onto digital pin 13 on the Arduino Uno.
Another connector will go from the Arduino Uno's ground pin to the LED on the breadboard, as will the resistors.
In the image below, you can see a “flash” sign, which is the compiler. Just click on it and the flashing LED program begins compiling and loading onto the Arduino Uno board.
Once done successfully, you can control the LED light right from your android phone. You can search for many other project examples in the ArduinoDroid libraries, which include servo motors, temperature and pressure sensors, and the like.
Conclusion
Learning how to manage and control your Arduino projects from your Android phone is easy and just requires a little attention. Of course, you can find more guidance on this topic on the official Arduino forum.
Shoot any questions or thoughts on this topic in the comment section below, and we'll be happy to answer them.
Further Reading:
- Arduino vs Raspberry Pi: Which is the Best DIY Platform?
- How to program a universal remote control
- How to put a GIF in your Instagram story
- How to save battery on Xiaomi phones
- How to schedule WhatsApp message