Skip to content

Latest commit

 

History

History
125 lines (88 loc) · 4.61 KB

README.md

File metadata and controls

125 lines (88 loc) · 4.61 KB

The RaspiCar Project

By Eliana Lopez

This project contains the full documentation and start to end process of modifying and RC car with a Raspberry Pi Model B+.

Table of Contents

click to expand

Tools used

  • HyperChargers Remote Controlled Car
  • Raspberry Pi 3 Model B+
  • Raspberry Pi Camera V2.1
  • L298N Motor Drive Controller Board Module
  • Mophie USB Power Bank, 10,500mAh
  • Female/Female Jumper Wires
  • Male/Female Jumper Wires

Setup

This is the hardware setup of the Raspberry Pi RC car within the diagram below. If unable to see it for any reason you can view the diagram here!

Diagram

After the Setup

Once you are finished setting up, I have added a folder named TESTING that has a Python file called motorControl.py. This file is created to see if your motors are connected correctly or referenced to the Raspberry Pi.

If you need any more information regarding Raspberry Pi GPIO pins this website contains more information.

The Code

Overall the layout of the code within your Raspberry Pi should look like this:

Directory

Creating the live streaming server

The files camera_pi.py and appCam.py are created by Miguel Grinberg.

  • camera_pi.py is the direcotry camWebServer
  • camApp.py is the webserver application

Creating a flask micro web application framework

web.py is the file that utilizes the webserver and integers the Raspberry Pi GPIOs that are being used, along with our camera.

This is a simple example of a "Hello, World!" program in Flask

from flask import Flask
app = Flask(__name__)

@app.route("/")
    def hello():
        return "Hello, World!"

if __name__ == "__main__":
    app.run()

Static and Templates

The folders static and templates are the HTML and CSS of our web application. It just helps design and format our Web User Interface when controlling the modified RC Car in Raspberry Pi

How to Run the Program

Turn on the Raspberry Pi via normally or SSH network (for a truly wireless experience)
For SSH network I use VNC viewer and put the IP address of the Raspberry Pi in order to conect to with with my laptop.

I have left these resources down below if needed:

Raspberry Pi Terminal input

Raspberry Pi Terminal input:
sudo python3 web.py
Got to http://0.0.0.0:5000/ in your browser to enter the motor controller user interface

Car in Action

This is the end result of the modified car.

Car-Running

What I learned

Here are some short thoughts I have learned from this project:

  • The integeration of various programming languages
  • Learned more about the technicalities of the Raspberry Pi
  • Learned more about pratical design of the car itself such as adding velcro straps to contain the out-covering and a bumper to protect the Raspberry Pi

Project Images

How it started

How it's going

Web User Interface Part I

Web User Interface Part II - final product