How to Build Your First Robot With a Raspberry Pi and Program it in Python - Step by Step Tutorial

Поделиться
HTML-код
  • Опубликовано: 30 ноя 2024

Комментарии • 66

  • @patreeceeichel2443
    @patreeceeichel2443  4 года назад +15

    Here's the order of the video so you can skip over parts if you wish!
    Materials: 0:07
    Materials List: 1:12
    Attaching Wires to the Motors: 1:17
    Attaching the Battery Pack 2:32
    Check the Motors: 3:15
    Attach the Motors: 4:25
    Attach the Ball Caster: 5:45
    Make a 'Chair' for the Motor Driver: 6:53
    Attach the Powerbank & Raspberry Pi: 8:47
    Attach the Wheels: 10:31
    Connect the Motors to the Motor Driver: 10:48
    Choose Your GPIO Pins: 13:03
    GPIO Chart: 13:26
    Connect the GPIO Wires to the Motor Driver: 15:07
    Write a GPIO Testing Script: 15:52
    Order Your Wires: 18:22
    Write the 'Good Copy' Code: 19:28
    Hope you enjoy!!

    • @phantomghostx1659
      @phantomghostx1659 4 года назад

      Also can you post a link that is in the U.S

    • @sarahalfiqi5664
      @sarahalfiqi5664 2 года назад

      can you copy the final code here

    • @yudish5431
      @yudish5431 2 года назад +1

      @@sarahalfiqi5664 first code
      import time
      import RPi.GPIO as GPIO
      GPIO.setwarnings(False)
      GPIO.setmode(GPIO.BOARD)
      print("0")
      GPIO.setup(29, GPIO.OUT)
      GPIO.setup(31, GPIO.OUT)
      GPIO.setup(32, GPIO.OUT)
      GPIO.setup(33, GPIO.OUT)
      print("1")
      GPIO.output(29, True)
      time.sleep(3)
      GPIO.output(29, False)
      print("2")
      GPIO.output(31, True)
      time.sleep(3)
      GPIO.output(31, False)
      print("3")
      GPIO.output(32, True)
      time.sleep(3)
      GPIO.output(32, False)
      print("4")
      GPIO.output(33, True)
      time.sleep(3)
      GPIO.output(33, False)
      print("5")
      time.sleep(3)
      exit
      print("6")

  • @dacypher22
    @dacypher22 14 дней назад

    One thing I highly recommend for robotics projects, is instead of using double-sided tape, get adhesive hook and loop tape. They come in a box with two rolls. It's basically Velcro (with each roll being one side of the Velcro pair), but they have strong tape on the back. So you can put one side of it on your chassis, and the other side on your component. It holds well, and also allows you to detach pieces with force and re-attach later. Very handy when you may find down the line in the project a cable is too short the way something is oriented, or to help you more easily recharge your batteries.

  • @ohnonotthevampire7191
    @ohnonotthevampire7191 2 года назад +14

    No drown out music. Useful commentary with full demonstration. Very well done video! Please keep it up!

  • @swaroophegde5831
    @swaroophegde5831 4 года назад +9

    Nice. My friend and I used the same kit to build an internet controlled bot. It basically had unlimited range, and we used a power bank as the power source. We also used a L293D motor driver. The long one with 16 pins

    • @dxs1667
      @dxs1667 4 года назад +1

      sounds like an interesting project and something i would possibly like to recreate. can you elaborate on how your robot was internet-controlled? did you use a raspberry pi? also, what were the output voltage and current of your power bank?

    • @swaroophegde5831
      @swaroophegde5831 4 года назад +3

      @@dxs1667 I'll just link the website which we referred. Just keep in mind that several codes of the python program are wrong, and you will have to tweak the code. The powerbank was of 5V but I don't remember the current.
      circuitdigest.com/microcontroller-projects/web-controlled-raspberry-pi-surveillance-robot

    • @dxs1667
      @dxs1667 4 года назад +1

      @@swaroophegde5831 perfect, thank you!

    • @swaroophegde5831
      @swaroophegde5831 4 года назад +2

      @@dxs1667 so did you do it?

    • @swaroophegde5831
      @swaroophegde5831 3 года назад +1

      @@dxs1667 it's been a year mate, I'm still waiting for a reply :)

  • @Toaddaddy
    @Toaddaddy 3 года назад +5

    I have watched a lot of videos on robotics on RUclips this was outstanding. Your the first person to explain the dot on the front of motor and correlation to rotation of the wheel clockwise and counter clockwise thankyou. Would you consider posting the codes please.

  • @thapelosamuel1969
    @thapelosamuel1969 Год назад +4

    Best instructional Video ever...straight forward and easy to understand...Big ups!!💯

  • @CarneSagrado
    @CarneSagrado 3 года назад +1

    .
    You are VERY THOROUGH! Very easy to follow! I wish you made more videos!
    Am now trying the Raspberry Pi PICO.
    Stay safe, have fun, enjoy life! 😁
    .

  • @12345yhut
    @12345yhut 18 дней назад

    Hi! Great video! At 19:30 you say the same as "your other one" where can we find this one? Also, how did you get the robot to start run the code?

  • @donaldnixon6911
    @donaldnixon6911 4 года назад +4

    Awesome work! Clean and concise. Very impressive!

  • @NaomiNorstrand
    @NaomiNorstrand Год назад +1

    I need it for my school project ty for making it

  • @seankang
    @seankang 2 месяца назад

    Hello. I really like your video. I have several questions: 1) can you show a wiring diagram between the motors, DC motor controllers and the PI pins 2) from what I can tell the motors have only 1 speed, have you tried doing this with a motor that has different levels of speed? 3) why are you using a cardboard to hold the motor controller board 4.) from the python code that you showed, can you move forward, backward, turn left (with n number of sec or degrees)? Also like others are asking, can you share the python code and python code need any configuration to talk to the raspberry pi GIO pins?

  • @BharatMohanty
    @BharatMohanty 4 года назад

    Hi you can Copy your pinned comment and paste it in description box. Edit very first time stamp to 0:00 and then text for example
    0:00 material
    .this will enable time stamp on video itself. And also this is the second video i have seen where . board is being used in every other tutorial they are using . BCM. Nice and informative tutorial..

  • @naokimc
    @naokimc 3 года назад

    ur very underrated!
    u have content which is pure gold!

  • @CodeMastersChannel
    @CodeMastersChannel 2 года назад

    thanks for this video very easy to teach for 0 experience people like me and simplify things like that

  • @lordstilton100
    @lordstilton100 4 года назад +2

    Can you add a link for the script.. I can't read it from the screen

  • @bobbyr8394
    @bobbyr8394 3 года назад +1

    this is awesome can you please make more videos of your creations and break it down for us on how to assemble it

  • @dxs1667
    @dxs1667 4 года назад +3

    this is a great tutorial--it was just what i was looking for. i'm building my first robot with an RPi 4 and would like to follow what you've done here, though i'd like to add remote control capability to it. do you think that's possible? how would you recommend going about it?

    • @swaroophegde5831
      @swaroophegde5831 3 года назад

      Did you do it mate?

    • @Cluffmaster1980
      @Cluffmaster1980 3 года назад

      @@swaroophegde5831 I have one built that can launch fireworks, want the code ?
      Do you have code for one ?

    • @swaroophegde5831
      @swaroophegde5831 3 года назад

      @@Cluffmaster1980 Thanks for asking, mate, but I'll have to decline.

  • @dsafgvhsbv2n4ew2jghquatuyvb
    @dsafgvhsbv2n4ew2jghquatuyvb 7 месяцев назад

    This is a bit of a late comment but can you please upload the link for the script/code? Great tutorial by the way!

  • @the_kid777
    @the_kid777 Год назад

    So, soldering is only required here?: 11:42

  • @mori5733
    @mori5733 2 года назад

    Hello. Great video. I have a small question... when you set up the right and left wheels individually, you gave them each a 1 and 0. Why is that exactly? Is zero(0) to stop moving and one(1) to begin moving? I believe I understand the rest of the code but I wasn't 100% sure for the reason. Thanks

  • @TEXREditz_915
    @TEXREditz_915 3 года назад

    Nice video My Son wants the Kit

  • @RobotCoder1951
    @RobotCoder1951 7 месяцев назад

    Awesome tutorial!

  • @oliverf2924
    @oliverf2924 3 года назад

    Great tutorial, too bad you don't produce more content

  • @AtomicStaple
    @AtomicStaple 3 года назад +1

    How were you able to disconnect the Raspberry Pi from the monitor, keyboard, and mouse but still have it run?

    • @hashemsada1761
      @hashemsada1761 3 года назад

      same question

    • @Mr0000rob0000
      @Mr0000rob0000 3 года назад

      The Pi will power up automatically when it gets power. You can have a python program running on startup. If you want to interact with the Pi (for instance to put the python program on there, or to tweak the program) the most common way, i guess, would be to use SSH (google is your friend on that one). Also use ssh to safely shut down the pi, as not doing so might easily corrupt your SD card. When using a battery powered setup you might also want to research writing a script to automatically safely shut down the Pi in case of low power to prevent data corruption (though this might be a bit more complicated)

  • @stinkyjutsu
    @stinkyjutsu 3 года назад

    so why do you want to only use the GPIO pins that don't have other uses like (SDA) or (TXD)?

  • @yootaegyum798
    @yootaegyum798 2 года назад

    wait so when the GP10 becomes true, then the motor works?

  • @E2ESolutionsDIY
    @E2ESolutionsDIY 4 года назад

    Good going Dear. Keep creating and keep growing. All the very best from #E2Esolutions and I Will support you as I can. And I am your 11th subscriber.

  • @sghaerchayma
    @sghaerchayma Год назад

    bonjour !
    tu peux me donner ce code s'il te plait parceque ce le meme projet que je le fais dans mon projet de fin d'étude

  • @animefreak207
    @animefreak207 3 года назад

    How does it work with Xbox 360 controller? Please help and give code for that 🙏🏽

  • @mcalex4747
    @mcalex4747 3 года назад

    my left wheel runs only backwards...

  • @jdcupp2667
    @jdcupp2667 2 года назад

    AMAZING VIDEO. Very helpful

  • @farhanagrivahutagalung8768
    @farhanagrivahutagalung8768 Год назад

    Please can you give ur final code, i need for my thesis please 🙏

  • @RaphaelRia
    @RaphaelRia 3 года назад

    appreciate the help, amazing video

  • @atangmatona2946
    @atangmatona2946 2 года назад

    Please make more videos

  • @nuthead8888
    @nuthead8888 4 месяца назад

    Hi Patreece, I want to build my own robot car from scratch and was wondering if you had the code posted anywhere so I could look at it more closely?

  • @ygt602
    @ygt602 2 года назад

    Hello, where can I get your code?

  • @electricalcoder3025
    @electricalcoder3025 4 года назад +1

    Goood ..and great job...👌👍👌👍👌👍👌👍👌..keep creating......since we have the same ...passion and channel contents... Raspberry pi and programming.....
    I will suppourt u as much as I can....and I Subscribed too...yours...Anyways...Best wishes..👍👍

  • @sajjadhusssinsajjadhussain9959

    Please coding Link send me this project

  • @andreafreeman6396
    @andreafreeman6396 3 года назад

    Sorry if this was mentioned but what coding language are you using?

  • @giovannicriscwcc4249
    @giovannicriscwcc4249 3 года назад

    molto brava !

  • @hballouz
    @hballouz Год назад +1

    the code part was so terrible to follow

  • @ammarabdul3921
    @ammarabdul3921 2 года назад

    plz can yo help me .to send me the code

  • @cristianooliveira7956
    @cristianooliveira7956 2 года назад

    Where is the code ?

  • @ammarabdul3921
    @ammarabdul3921 2 года назад

    plz can you send me the code

  • @DeathlessIce
    @DeathlessIce 2 года назад

    Samm is my pet

  • @yusufmuhamed7234
    @yusufmuhamed7234 10 месяцев назад

  • @nuthead8888
    @nuthead8888 4 месяца назад

    I'm following your code exactly at the end and I keep getting this error:
    RuntimeError: The GPIO channel has not been set up as an OUTPUT
    It is assigning this error to the forward function. Can you help me figure out what's wrong? Because I followed your code exactly.

  • @elevate_waves
    @elevate_waves 3 года назад

    We are working on a similar kind of project. I would appreciate it if I get an email of yours so I can discuss the problems we are facing.