
Android Mobile controlled Robotic car using Raspberry Pi
Call for Price
Android Mobile controlled Robotic car using Raspberry Pi
Description
ABSTRACT
In the Robotics cars are developed with more functionalities, as the Raspberry Pi beginner now you can able to learn to control the Robotic car using android mobile application interfaced by Raspberry Pi through wireless communication using Bluetooth. Controlling the Car by pressing some buttons present in the android application, which sends different characters for each buttons to control the car movement, which the commands send from the Android applications are reconfigurable based on the python programming which written in the Raspberry Pi for each action to be happened on Robotic car.
HARDWARE REQUIRED
- Raspberry Pi
- SD card
- Power supply
- VGA to HDMI converter (Optional)
- L293D (Driver IC)
- Robotic car chasis with motor and wheel
- Bluetooth module(optional)
SOFTWARE REQUIRED
- Raspbian Stretch OS
- SD card Formatter
- Win32DiskImager (or) Etcher
- Android application which compatible with HC-05
PYTHON LIBRARIES USED
- RPi.GPIO as GPIO (To access the GPIO Pins of Raspberry Pi)
- Time library (For Time delay)
- Serial Library to receive commands serially
- Bluetooth Library
CODE
import RPi.GPIO as GPIO
import bluetooth
import time
MotL_A = 5
MotL_B = 6
MotR_A = 13
MotR_B = 19
GPIO.setmode(GPIO.BCM)
GPIO.setup(MotL_A, GPIO.OUT)
GPIO.setup(MotL_B, GPIO.OUT)
GPIO.setup(MotR_A, GPIO.OUT)
GPIO.setup(MotR_B, GPIO.OUT)
server_socket = bluetooth.BluetoothSocket(bluetooth.RFCOMM)
port = 1
server_socket.bind(("", port))
server_socket.listen(1)
client_socket, address = server_socket.accept()
print ("Accepted connection from "), address
def Forward():
GPIO.output(MotL_A, 1)
GPIO.output(MotL_B, 0)
GPIO.output(MotR_A, 0)
GPIO.output(MotR_A, 1)
def Backward():
GPIO.output(MotL_A, 0)
GPIO.output(MotL_B, 1)
GPIO.output(MotR_A, 1)
GPIO.output(MotR_A, 0)
def Left():
GPIO.output(MotL_A, 0)
GPIO.output(MotL_B, 0)
GPIO.output(MotR_A, 0)
GPIO.output(MotR_A, 1)
def Right():
GPIO.output(MotL_A, 1)
GPIO.output(MotL_B, 0)
GPIO.output(MotR_A, 0)
GPIO.output(MotR_A, 0)
def Stop():
GPIO.output(MotL_A, 0)
GPIO.output(MotL_B, 0)
GPIO.output(MotR_A, 0)
GPIO.output(MotR_A, 0)
data = ""
while (True):
character= client_socket.recv(1024)
print ("Received: %s") % character
if (character== "F"): # Moving Forward
Forward()
elif (character== "B"): #Moving Backward
Backward()
elif (character== "L"): #Turning Left
Left()
time.sleep(1)
Stop()
elif (character== "R"): #Turning Right
Right()
time.sleep(1)
Stop()
elif(character=="C"): #Rotating Clockwise
Right()
elif(character="A"): #Rotating Anticlockwise
Left()
elif (data == "S"): #Robot Stop
Stop()
client_socket.close()
server_socket.close()
Additional information
| Weight | 0.000000 kg |
|---|





Reviews
There are no reviews yet.