How to Control Motor using Android Raspberry Pi?

I want to Control Motor rotations using Android OS Rasbery Pi.

Expected Behaviour: When I Press “Start Button” on Android Device (Rasbery Pi) Motor connected to Rasbery Pi should rotate for “3 Seconds or/ Specific Distance”
After Online Payment Successful!

Can we control motor rotation directly using android device? Without Arduino/Raspberry

Can anyone help.

and how to send order start/stop/speed from Kodular App.

please elaborate, see also


Updated Expected Behaviour

I think you can use arduino

But I want to verify Payment. So we can do this in Raspberry pi Android

You have to use a payment gateway or upi payment extension

I Know that. but how to connect connections & How to post Orders from app to motor…?

I don’t know that exactly because I never used arduino. Sorry…

By Bluetooth, WiFi, MQTT,…

I can’t trust on Wifi, Bluetooth Wireless Connections. Because It should be always awake 24/7. and Bluetooth & Wifi Automatically get disconnected some time…

Can we Control it Android OS Installed in Raspberry pi.

You can install a Bluetooth Server on Raspberry Pi, and/or a Wifi Access Point and they will work 24/7 as long as the RPi is powered.

Confusion with “Pi” and “Pie”

  • Raspberry Pi is called Raspberry Pi.

  • Android 9 is Android “Pie”.

Can we Control it Android OS Installed in Raspberry pie. (¿?)

You can install an Android, example Android 9 “pie” on a Raspberry Pi (or another version of Android.)
Cómo instalar Android 9 en un Raspberry Pi 3 con RaspAnd (It is in Spanish)

I think the best option is to install a Bluetooth Server on the RPi, it is a somewhat complicated process, you can find many tutorials, this one in Spanish.


So, is there no way to wired connection? Because if i want to use WIFI/Bluetooth then Arduino is better.
I’m choosing Raspberry Pi because we can Install Android OS for App.

Problem is just i don’t know how to make series connection to Motor & Control it using App.

In the App Inventor Community there is an extension called Appinventor-SerialOTG, through this extension you can connect the Arduino with the mobile via USB cable (OTG).
Here I put some tutorials.

1 Like

You can choose between three types of motors:
1.- Servo (there are 180º and 360º)
2.- Stepper motor.
3.- Continuous motor.

Here you can control two servos via Bluetooth with Arduino.

This is a Stepper motor:

1 Like

Can we Directly Control motor through Raspberry Pi with Android OS.
It reduces Connection.

Do you mean to control an engine with Android OS installed on a Raspberry Pi?
I have not done it but I think it can be done.

Another possibility is to install Raspbian on RPi.
Connect a keyboard (KeyPad) and motors or servos to RPi.
Using the keyboard you can move the servo.
For example you press 30 # and the servo will move to 30º.

You don’t need Android here.

I want to make it completely Automatic and cloud Connected for Final product.
Behavior should be:
When User Make Payment using QR code
Android App will Verify Payment Succesful & pass command to Rotate Motor for Specific Time/Dimension.

It’s Like Connecting Motor to Normal Android Device. Raspberry Pi just gives some more freedom in connectivity.

If don’t find any solution then i have to go with Series OTG connection using Arduino.
but hoping for Raspberry Direct Connection to Motor.

Then MQTT or FireBaseDB in Raspberry Pi