How to Control DC Motor With Android Smartphone, Arduino and Bluetooth With RemoteXY Application
Try Code Monkey: Coding for Kids
How does it work?
Smartphone Interface
You can use the free RemoteXY editor from the website RemoteXY.com to design a stylish smartphone interface that can control your Arduino circuit. With all the switches, pushbuttons and sliders that make your application work smoothly.
You may also like this post about ESP8266
We’ll see how you can choose the core details of your Arduino circuit and communication method.
Arduino Sketch and code
Then finally, the RemoteXY Editor automatically generates the Arduino code for you.
Then all you need to do is to upload the sketch to your Arduino board and then run the RemoteXY app on your smartphone and get started.
You don’t have to connect to internet to connect your smartphone and Arduino circuit with Bluetooth.
RemoteXY Editor generates Arduino sketch with all needed code and also data of the interface such as buttons and sliders.
The RemoteXY library seamlessly sends the interface and configurations data from Arduino board to your smartphone RemoteXY app and then the Smartphone App interprets the interface offline without the need to connect to internet.
Supplies:
Arduino Pro Mini Board Amazon UK , Amazon DE , Banggood
Here, I used Arduino Pro Mini to make the circuit smaller to use in other applications
However, You can use any Arduino board and you can choose it from the RemoteXY editor as we’ll see.
USB to TTL converter Amazon UK , Amazon DE , Banggood
Since Arduino Pro Mini has no USB port, you need this program Arduino Pro Mini from your computer.
Bluetooth Module HC-06 Amazon UK , Amazon DE , Banggood
2N2222 NPN transistor
We’ll use this transistor as a switch to control the DC motor with Arduino.
3 volt DC Motor Amazon UK , Amazon DE , Banggood
3.7 V battery Amazon UK , Amazon DE , Banggood
Some wires
Step 1: RemoteXY Editor



Open RemoteXY.com, create a new account if you don’t have one and Login.
Create a new project and name it.
First, from configuration tab on the right, choose
Connection — Bluetooth
Device – Arduino Pro Mini
Module – HC-06
IDE — Arduino IDE
Open Module interface tab on the right, choose
Connection interface —- Software Serial
RX Pin —- Pin 7
TX Pin —- Pin 8
Baud Rate 9600
Design the Smartphone interface
From the left toolbox choose
ON/OFF Switch and place it on the blank phone screen
Slider and place it on the phone screen
From the right side choose the element tab choose Switch
Snap to PIN —- PIN 6
You can also choose to change switch caption ON/OFF and color from here.
From the right side choose the element tab choose Slider
Orientation — Horizontal
From the View tab on the left side choose Background color.
Place the controls on the place you want to become final and resize them.
Save the project.
Step 2: Get Arduino Code

Click the Green button on the right side Get Source Code
You get the generated Arduino code on the screen.
You can see the Arduino code on the screen and you can either choose to select and copy it or you can click Download Code
Click Download Library to get the RemoteXY.h library
Download RemoteXY App from App Store if you have iPhone or from Google Play Store if you have an Android Smartphone.
Step 3: Arduino IDE and Upload Code

Open Arduino IDE and paste the code you copied into a new
sketch or open the downloaded code.
That’s all the code we need to control the motor ON and OFF from the smartphone with Arduino and Bluetooth circuit.
The ON/OFF switch is connected to PIN 6 which controls the NPN transistor which runs as a switch to deliver power to the DC motor.
To use the slider as a speed control we need to connect it to PIN 6 that controls the NPN transistor.
The speed control is done with PWM Pulse Width Modulation function (Known As Analog Write in Arduino)
We need to add two lines of code to connect the RemoteXY slider to PIN 6. We add them to the loop function.
Here they are
int MotorSpeed = RemoteXY.slider_1 * 2.5 ;
analogWrite(6, MotorSpeed);
In the first line of code, we define the MotorSpeed variable we read from the slider inside the RemoteXY interface.
The slider in the interface reads values from 0 to 100. So we need to scale that value to be compatible with the analogWrite() function in Arduino. The analogWrite() function outputs values from 0 to 255 which outputs 0 to 5 volts according to the value between the parenthesis ().
That’s why we need to scale it by multiplying it to 2.5.
In the second line of code we output the MotorSpeed directly to PIN 6 connected to the NPN transistor and the DC Motor.
Here is how the loop function looks like.
Save the code and Compile it to check that it’s correct with no errors.
Attachments
Step 4: Assemble Arduino Circuit


Connect the circuit as in the images.
Here is another post that describes how to program Arduino Pro Mini in more details.
First, we need to connect Arduino to USB-to-Serial Converter to program the software. Normally, you don’t need this step if you use Arduino UNO or any other Arduino board that has a built in USB port.
USB-to-Serial ———– Arduino Mini
3.3 v ———————– VCC
GND ———————- BLK
RXD ———————- TXD
TXD ———————- RXD
DTR ———————- GRN
Caution:
Make sure that you power Arduino Pro Mini with 3.3 V
Upload the sketch to Arduino Pro Mini
Then we connect the final circuit to Bluetooth module and the motor
HC-06 ——————– Arduino Pro Mini
VCC ——————– VCC
GND ——————– GND
RXD ——————– PIN 8
TXD ——————– PIN 7
Connect the 2N2222 NPN transistor to Arduino Pro Mini
Collector ——————- Motor Power Supply
Base ——————– PIN 6
Emitter ——————– GND
Step 5: Run the Final Project



Connect the circuit to the battery and power the circuit.
Run the smartphone RemoteXY application.
Connect Bluetooth and start controlling the motor ON/OFF and the motor speed with the Slider.
Recent posts
- The “Secretary of War” and the Beast: Why the Doomsday Plane Just Landed at LAX
On January 8, 2026, the Boeing E-4B Nightwatch, known as America’s “Doomsday Plane,” made a rare appearance at Los Angeles International Airport. It transported Secretary of War Pete Hegseth during his “Arsenal of Freedom” tour, aimed at reviving the defense industrial base, sparking debate over its high operational costs amidst its significant Cold War legacy. - Build a Pinguino Egypt: A PIC-Based Arduino Clone (Complete Guide + Resources)
I wanted to build my own Arduino. Here’s a project where you can build Arduino Compatible with your favorite Microchip PIC Microcontroller. - Why I Built This App: Stepping Away From Screens to Come Back to Ourselves
Lately, I’ve been spending time reading posts on Reddit. Not the funny ones or the viral threads—but the honest ones. People talking about how isolated they feel. How unproductive. How days blur together behind screens. How they feel connected to everyone and no one at the same time. What struck me wasn’t laziness or lack… Read more: Why I Built This App: Stepping Away From Screens to Come Back to Ourselves - US ‘Doomsday Plane’ Spotted Today: What It Is, Why It Matters, and What We Know So Far
The U.S. Air Force E-4B “Doomsday Plane” was sighted landing at LAX, attracting public attention due to its rare visibility. Designed as a National Airborne Operations Center, it ensures military command during crises. However, today’s appearance likely reflects routine operations rather than an emergency, emphasizing its role in military preparedness. - Why Arduino Ultrasonic Sensor Gives Random Values ? (And 3 ideas to Fix It)If your Arduino ultrasonic sensor gives random, unstable, or jumping distance values, you are not alone. This is one of the most common Arduino beginner problems, both in real hardware and even in Tinkercad simulation. In this article, we’ll explain: What “Random Values” Really Means When people say random values, they usually mean: These symptoms… Read more: Why Arduino Ultrasonic Sensor Gives Random Values ? (And 3 ideas to Fix It)
- The Advantages and Disadvantages of Quantum AIrtificial Intelligence (AI) has already changed the way we live, work, and solve problems. But when you combine AI with quantum computing, a new frontier opens — one that could transform industries at a speed and scale we’ve never imagined. This powerful combination is called Quantum AI. Like any disruptive technology, Quantum AI carries both… Read more: The Advantages and Disadvantages of Quantum AI
- How to Save Money with AI: A Practical Guide
Artificial Intelligence (AI) is transforming not only industries but also personal finance. Beyond hype, AI tools can directly help you save money, cut waste, and make smarter everyday decisions. Here are seven practical ways to use AI for financial savings: 1. Smarter Shopping AI-powered apps and extensions automatically find coupons, discounts, and cheaper alternatives online.… Read more: How to Save Money with AI: A Practical Guide - My Experience at the First Alexandria Quantum Hackathon
Today, I had the incredible opportunity to attend the first Alexandria Quantum Hackathon — a landmark event in Egypt and the wider region dedicated to quantum computing education and innovation. The event was hosted at the iconic Bibliotheca Alexandrina, making it even more inspiring to witness the future of computing being discussed in such a historic place… Read more: My Experience at the First Alexandria Quantum Hackathon
