Giter VIP home page Giter VIP logo

the1lama / python-car-l298n-motor-driver-with-web-controller Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 46 KB

This was a school project for controlling a car with python using html/flask, and now I'm putting the code online, because of I didn't find a complete build with a raspberry pi with a l298n motor driver.

HTML 31.79% Python 68.21%
python flask website html rasperrypi l298n car raspberry-pi

python-car-l298n-motor-driver-with-web-controller's Introduction

python car with flask

This was a school project for controlling a car with python using html/flask, and now I'm putting the code online, because of I didn't find a complete build with a raspberry pi with a l298n motor driver.

How I have devided up the project is in web-site where I have put in the raw html file if you wanted to look closer to the file how it is built up. In the motor movment I have the code for the motors, one has the controlls in the terminal, the other is combined with the html and flask to controll the car. Lastly in the finished version the whole project is combined to just CTRL + C , CTRL + V.

Things needed to be able to build the car

  • Raspberry pi
  • L298N motor driver
  • 12V DC Motor (2)
  • 9 - 12 power supply
  • cabels
  • bread board
  • platform for car
  • Flask installed to raspberry
  • Have GPIO installed

Instruction

So I have put all the code in thier seperate folder that you can copy and paste, or download the files and use the finished folder and just build the car.

  1. Power supply positive pole goes to the +12 on the l298n board.
    1. Power supply negavite pole goes to the GND on the l298n board and on the raspberry pi GND
  2. Conect the two DC motors to the motor driver
  3. For the fist set of three cables from raspberry to motor driver
    • GPIO 23 --> ENA
    • GPIO 25 --> IN1
    • GPIO 24 --> IN2
  4. For the other three cables from raspberry to motor driver
    • GPIO 16 --> IN3
    • GPIO 20 --> IN4
    • GPIO 21 --> ENA
  5. Download the or copy files from the finished version folder as the order I have done, to a raspberry pi.

Circuit Diagram of the raspberry pi car

diagram


Definition

  • ENA,ENB : enables PWM
  • PWM : Pulse-width modulation changes the electrical signal feed to choose how strong the current is
  • GND : Ground
  • IN1,IN2,IN3,IN4 : For the diffrent side of the motor driver
  • Flask : a program in python that you have to download to use
  • BCM : "Broadcom SOC channel" They signify the Broadcom SOC channel designation.
    • BOARD : is the fysikal pins on the raspberry pi

python-car-l298n-motor-driver-with-web-controller's People

Contributors

the1lama avatar

Forkers

razbruh1337

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.