ESP32CAM for Robotics - MicroPython and SMARS

Поделиться
HTML-код
  • Опубликовано: 5 сен 2024
  • Do you want to know how to use the ESP32CAM module in your robotics projects so that you can see what your robot is looking at? I'll also show you how to flash MicroPython onto these boards so that you can create a simple app to capture images and publish them to an on device web server. Finally I'll show you how I created the bluetooth SMARS robot with the ESP32CAM holder add-on.
    Thingiverse SMARS ESP32CAM Module
    www.thingivers...
    Bluetooth Code for Dabble
    github.com/kev...
    Custom MicroPython Firmware for ESP32CAM
    github.com/lem...
    💁‍♂️ For more information on SMARS Robots, tutorials and more visit: www.smarsfan.com​
    🎖To join the membership at 🥉bronze, 🥈silver or 🥇gold levels, head over to
    www.smarsfan.c...
    ☕️ Enjoy this video? Buy me a coffee! www.buymeacoff...
    📸 Follow me on Instagram - @kevinmcaleer / kevinmcaleer
    🐦 Follow me on Twitter - @kevsmac / kevsmac
    🙂📘 Join the Facebook group - Small Robots / smallrobots
    👩‍💻 PicoCat MicroPython Code on GitHub: www.github.com...
    🎵 Music by Epidemic Sounds www.epidemicso...
    #ESP32Cam​ #MicroPython​ #Robotics

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

  • @curtkeisler7623
    @curtkeisler7623 6 дней назад

    Thank you so much for letting us know straight away that Python is too slow to work on this. Saved me a TON of time trying to sort that out. Big thanks sir!

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

    Hello, great video! Personally, I have upload the firmware well with CH340 USB to UART driver, but when I'm trying to connect to the interpreter, it shows me "Device is busy or does not respond", so I don't know what to do

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

      I got the same problem. Did you find a solution?

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

      @@julienbouquet9502 same problem here, any solution?

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

      Hello, same error¡ How did you fix it?

    • @rafaelcunh
      @rafaelcunh Год назад +2

      For those with this problem, you need to open configuration.ini inside of Thonny data folder and add under ESP32 section:
      [ESP32]
      dtr = False
      rts = False

    • @ozgurgirgin5171
      @ozgurgirgin5171 8 месяцев назад

      I've written these, but the issue persists. I continue to receive the same error message.@@rafaelcunh

  • @MohamedKhaled-qn5fh
    @MohamedKhaled-qn5fh 2 года назад +1

    camera module has no attribute called init()
    what should i do?

  • @zoyamchuang2806
    @zoyamchuang2806 3 года назад +2

    Could it use internal BLE or WIFI to control by Dabble App?

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

      You probably could but it would involve changing the C code for the esp32cam firmware - that’s been highly optimised for streaming over IP, so I’m not sure what the effect of including the Dabble library would have

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

      @@kevinmcaleer28 Thanks for advise.

  • @mmshilleh
    @mmshilleh 8 месяцев назад

    So there is no way to stream with this thing in micropython? Have you tried it? Just curious if the functionality even exists or if it is just outright too slow.

    • @kevinmcaleer28
      @kevinmcaleer28  8 месяцев назад

      Yes I tried it and it’s not practical in MicroPython, it’s actually impressive that it can do it at all in C++

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

    Regarding how to flash Micropython...
    I understand the ESP32's boot_py calls my main_py.. and if that doesn't exist it will default to REPL.. However, what if my main_py needs to interface to the user via the UART that is in use by REPL?
    As a workaround, is it possible to upload lots of custom python scripts, and then execute them thru the REPL interface? For example, the REPL user would execute "CONNECT_py" (via the standard UART/USB interface), my CONNECT_py would establish a bluetooth connection with an external device. Then when the REPL user wants to transmit, he would call "TX 1234". (The TX_py script would take the 1234 argument and send it via the open connection)?
    And/Or.. could the micropython REPL interface be easily disabled (or defined to a different UART), thus freeing the UART/USB interface for my main_py program?

  • @Michaelo29
    @Michaelo29 2 года назад +2

    OSError: Camera Init Failed
    What i should do ?

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

      That usually means either the firmware isn't correct of the pins are the wrong way round. Also check the camera module hasn't popped out the little socket on the board - mine is always doing that.

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

      This also happened to me. I just flashed the firmware again and unplugged the voltage from the camera module. I tried it again and again and at some point it worked.
      I used Thonny to flash the firmware and disconnected voltage by pulling Vcc from the module. I waited for about 10s before plugging Vcc in again. You will have to reconnect with the USB chip in the Thonny GUI.
      Also i used the ft232rl USB to serial chip.
      Edit: I changed the script a little:
      import time
      while not sta_if.isconnected():
      time.sleep_ms(100)
      This should make sure that the script only goes on if a connection is established.

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

    i'm sorry if this is a bit rude but is it correct if i become a menber i can access to the code in the video?

  • @user-em7cz3tw5r
    @user-em7cz3tw5r Год назад +1

    How do you store the images to an SD card?

    • @RyouscxreD
      @RyouscxreD 11 месяцев назад

      open filemanager> and select images or pictures>hold it till u see move> now do move to sd card

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

    Hello, how can I convert image information to base64 and send it with an api?

  • @bottle0523
    @bottle0523 2 года назад +2

    Hello Sir
    it is a great teaching for Micropython ESP32CAM . I base on your instruction to do it but I found I can't show image in web, Would you provide index.html file? Thanks

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

      You need to connect to the cameras wifi hotspot if you are using the firmware out of the box. Once you've connected to the esp32cam 's hotspot you can then find the webpage, its usually something like 192.168.1.4

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

      @@kevinmcaleer28 Please where can have the ip adresse in order to get the live camera page (in 10:21) using Thonny and micropython ?

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

    Strange. I tried to upload uPython on that ESP32-CAM board with FTDI last year but I was not able to so I programmed it with Arduino. The other day, I purchased the same board with the USB interface as shown in your video and still cannot upload it with uPython (any version). Does work with Arduino, however :(

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

      Same here. I've been trying to upload some micropython firmware over and over. The upload of the firmware through Thonny goes apparently well, but then Thonny never catchs the interpreter, and always raise some "Device Busy" error.
      I tried with both firmware from the git project and also the main esp32 firmware from microptyhon website. Always the same result... I'm desperate...
      I wanted to use this with students at school, and I'm really not willing to use C and arduino with them... I'll have to find another project idea...

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

      @@nicolaslance8518 if you don’t want to use Arduino IDE, use Python on a Rpi Zero W with a camera. The students will definitely gain not only speed with the board but endless knowledge as their projects will be limited only to their imagination 😉

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

      @@nicolaslance8518 that was happening to me, too, until I accidentally discovered a way around it. If you reset the board with Thonny connected somehow it goes into firmware download mode. Reset the board while disconnected from Thonny, then connect after it has finished booting to REPL

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

    Please sir help me.
    A fatal error occurred: Failed to enter RAM download mode. Only got 2 byte status response.
    I got this error, when i try to install frimware.

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

      Did you connected GPIO0 to GND when you tried to install the firmware?

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

      @@MattOid Thanks for reply. Yes, u r right. This was the same error.. and, already I sloved this.

  • @andironner6784
    @andironner6784 2 года назад +2

    can you upload your code?

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

      Hi Andy, for this project the ESP32Cam isn't running any code I've created, its an out of the box firmware from thinkai - you connect to the cameras wifi hotspot and view the video through a browser. I'm using an Arduino and Bluetooth to control the robot

    • @Tyrone-Ward
      @Tyrone-Ward Год назад

      @@kevinmcaleer28 The first half of the video you show a project that says it was written by you. You can see your name on line 2 at 4:42. I don't see it in your GitHub page though.

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

    sorry but this is NOT 5V chip - chip is 3.3V. Board is 5V ;-)

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

      Doh - you're right - I said chip when I meant board (think I said it twice in that clip).

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

      @@kevinmcaleer28 the only thing the 5v does is supply the 3.3v regulator, every single thing on the board is 3.3v. It is much more power efficient if you supply it with 3.3v and ignore the 5v.