Arduino in Smartphone?

Can We use Arduino in SmartPhone?

             The answer is yes...we can use Arduino in mobile phone. There are different apps for running Arduino on a Smartphone. Come on let's see how yo use...

            Let's see a simple example of Blinking a LED using a Smartphone IDE for Arduino.

Things Require:

  1. Smartphone (With OTG Support)
  2. OTG Cable(According to the mobile you choose for say Type B OTG/ Type C OTG)
  3. Arduino Uno Board and Cable
  4. LED (Use Breadboard and resistor if required)

Process:

      We are going to run a LED on Arduino. The Power supply is going to come from SmartPhone and the IDE is also SmartPhone only...

      We are going to do the coding on the Smartphone using the app and run a simple program on it.






     Step 1


Download the App from the Play Store. There are different apps from the play store but I would suggest one of the apps from it.

The app name is: ArduinoDroid - Adruino Ide


The app takes about 210Mb as it contains IDE, compiler and uploader. Make sure you have enough free space in internal storage and it can't be installed on sd card because of Android security policy.





Step 2


  • After Downloading it, Open the app and it directly opens the IDE page.
  • This app has many build-in programs, We can use this build-in Programs or We can code ourself.
  • Type your code on IDE of that app and press the save icon on the IDE.

  

Code for Blinking a LED:


void setup() {
  
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   
  delay(1000);                      
  digitalWrite(LED_BUILTIN, LOW);    
  delay(1000);                       
}

Note:

  • Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to the correct LED pin independent of which board is used.
  • If you want to know what pin the on-board LED is connected to on your Arduino model, check the Technical Specs of your board at https://www.arduino.cc/en/Main/Products.
After Typing the program, Save the file and move to the next step.

Step 3


Now connect the OTG cable on the mobile phone and connect it with your Arduino board with the Arduino Cable.

Then connect the Arduino with the Led (use resistor and breadboard if required)


Step 4

  • Now Open the app, Click 3 dots on the top right and Select the board Which you use.
  • After Selection, Use the program available already or code your own program.
  • Then press the Power symbol on the IDE to Compile the program.
  • After that Click the next near button to upload the program and upload it to your board,
  • Now your LED starts Blinking.



The main Advantage of using this app is you don't need a Laptop to run the Arduino and you can use the Arduino where ever you want.

You can do many different activities using this app like Bluetooth controlled projects, Servo projects and other kinds of stuff, etc.,

Meet you in the next blog with different content soon...

-Immanuel Aakash V
The Common Engineer

Comments

Popular posts from this blog

Different types of Arduino boards