Skip to content

This repo contains code to interface robot with PiCamera, transistors (for switching 12V high brightness LEDs), Ultrasonic Distance Sensor and Speaker (for text to speech)

Notifications You must be signed in to change notification settings

jiteshsaini/robotics-level-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 

Repository files navigation

Visit Website: Youtube Channel:

Robotics Level 2 : Interfacing Camera, Lights, Ultrasonic Distance Sensor and Speaker with robot

Building upon the code created in Robotics Level 1, this repository contains code to interface the robot with additional hardware such as PiCamera, transistors (for switching 12V high brightness LEDs), Ultrasonic Distance Sensor and Speaker (for text to speech)

The code for interfacing the additional hardware is placed in the following respective folders inside 'earthrover' directory:-

Further, created a Web GUI or Web Control Panel for the robot. Using this panel, user can interact with the robot and control its hardware through a browser.

Brief overview of the code present in this repository is as follows:-

TypeNameDescriptionMore
foldercamera_lightsThis folder contains code for streaming video using Pi Camera module and interfacing GPIO pins with Transistor switching circuit. The live video feed can be monitored on the Web Control Panel. The panel also has controls to switch ON/OFF the robot lights and camera.Read Article for detailed code explaination and circuit diagram
folderrange_sensorThis folder contains code for interfacing Raspberry Pi with Ultrasonic Range Sensor and associated Web controls.The folder contains python files to control Ultrasonic Distance Sensor HC-SR04 for measuring the distance from an obstacle. The distance measured by the sensor is displayed on the Web Control Panel when the sensor is turned ON. The robot is programmed to move backwards in case it detects an obstacle within 30 cm
folderspeakerThis folder contains code for Speaker interface (Text to Speech functionality and associated Web Controls. User can type the text on the Web Control panel which is passed to the robot over wifi LAN. The text is converted to robotic speech using ESPEAK module inside Raspberry Pi and spoken out through a mini speaker connected to the audio port of Raspberry Pi
foldercsscontains CSS files used in "index.php" and "remote.php" files
folderjscontains Javascript files used in "index.php" and "remote.php" files
folderpwmcontains Python files for speed control of DC motors
fileindex.phpThe main file resposible for rendering Web Control Panel GUI
fileremote.phpThis file generates the direction and speed control GUI. It is embedded inside the "index.php" file
filevars.php A file with utility functions. These functions interact with GPIO pins for achieving robotic controls
fileajax_direction.phpreceives direction data from client and calls relevant function in "vars.php"
fileajax_speed.phpreceives speed data from client and calls relevant function in "vars.php"
fileutil.pyThis file also has utility functions (similar to "vars.php") implemented in Pyhton. It is used when robot's direction needs to be changed programatically. Example: Obstacle avoidance implemented in "range_sensor" folder

About

This repo contains code to interface robot with PiCamera, transistors (for switching 12V high brightness LEDs), Ultrasonic Distance Sensor and Speaker (for text to speech)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published