ESP32 MicroPython Tutorial with Raspberry Pi

Поделиться
HTML-код
  • Опубликовано: 19 июн 2024
  • This tutorial demonstrates how to set up and program an ESP32 device running MicroPython from a Raspberry Pi. All the code, schematics, notes and updates are available on my website: www.rototron.info/raspberry-pi...
    This is the first part in a series of MicroPython ESP32 tutorials.
    Playlist for all videos: • ESP32 MicroPython Tuto...
  • НаукаНаука

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

  • @rdagger
    @rdagger  7 лет назад +38

    UPDATE: The starting address now needs to be 0x1000 instead of zero when you write the firmware to the ESP32.

    • @sherifeid310
      @sherifeid310 6 лет назад

      Thanks a lot for the update, can you annotate this in the video inline at the moment of programming. I programmed the wrong address then I had to figure out what happened

    • @rdagger
      @rdagger  6 лет назад +1

      Done. Thanks for the feedback.

    • @dsiee
      @dsiee 5 лет назад

      @@LuciferGloria Yes, the RPI has plenty of power (600mA on the USB Bus by default, can be increased to 1.2A, the esp 8266 uses about 200-300mA peak); however, if your power supply for the Pi isn't big enough you could have a brown out. If your esp8266 and wiring is ok, you shouldn't damage your Pi, even if there is a brownout but you may corrupt the filesystem.

  • @serverguy2
    @serverguy2 6 лет назад

    This is the first one of yours I have watched. It went by fast, so thank goodness for rewind and pause! You certainly crammed a lot of useful information in this short video. Thank you.

  • @bgable7707
    @bgable7707 5 лет назад +3

    I appreciate your videos. the pace is great, clear and concise!!! And, keep it up with the ESP32, etc. Well done from a newbie in all the micro stuff. Glad to see Python making headway in this space.

  • @MartynCole
    @MartynCole 6 лет назад

    This tutorial has helped me immensely, I have installed rshell and this is just what I needed to get code onto my ESP32 board.
    I have subscribed.

  • @alfblack2
    @alfblack2 5 лет назад +1

    just discovered this series, loving it. I hope there is more! checking now.

  • @sinnoj
    @sinnoj 6 лет назад +1

    Just finished I actually was one of the Kickstarters for MicroPython. I think this is awesome please do more as I work my way through your tutorial's
    Thank you

  • @anumsheraz4625
    @anumsheraz4625 5 лет назад +2

    Best and to the point tutorial video on RUclips. Keep up the good work :)

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

    What a great video. I really liked the commentary, explaining what you were doing.
    This is just what I was after.
    I've just subscribed and will be looking for more :)

  • @pirateman1966
    @pirateman1966 6 лет назад +1

    Dude, that was awesome!
    It went so smooth just by copying and pasting from your site. No surprises. No drama.
    Thanks man. Sub +1

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

    Outstanding video. Answers so many questions I had since I started playing with Pi and components, trying to get into IOT. ✔

  • @hoganhashem5168
    @hoganhashem5168 6 лет назад

    I like your way to simplify usage of esp32

  • @Jarito1903
    @Jarito1903 5 лет назад

    you deserve a medal sir. Thanks

  • @garyrowlands8537
    @garyrowlands8537 5 лет назад

    Excellent tutorial. I can only mirror the other comments, YES, please continue to make these and I am just going to check out your whole play list :)

  • @tascaqiu7112
    @tascaqiu7112 5 лет назад

    Love your esp32 videos!

  • @lunatik9696
    @lunatik9696 5 лет назад

    Thank you. This video came up in my RUclips feed. It is very good. Yes, more vids with the esp32 would be nice. especially controlling a string of neopixels.

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

    Excellent video and well done!

  • @yekutielbenheshel354
    @yekutielbenheshel354 6 лет назад +6

    Excellent tutorial! It helped me learn about the ESP32 and MicroPython. Thanks!

  • @AndresJesse
    @AndresJesse 6 лет назад

    Very nice! worked here using OrangePi PC Plus (running Ubuntu) as developer PC and Lolin32 Board. Keep with the tutorials, you have good stuff.

  • @saurabhinorange
    @saurabhinorange 6 лет назад

    Fantastic, please continue making videos

  • @williammiller4143
    @williammiller4143 6 лет назад

    Great presentation. Please continue.

  • @jamescullins2709
    @jamescullins2709 5 лет назад

    love your videos, would love to see an update on the ESP32 . Thank you

  • @fabmeloman
    @fabmeloman 5 лет назад

    I learned at lot in this video, thanks for sharing

  • @bartdemeulmeester4662
    @bartdemeulmeester4662 6 лет назад

    Great video. Any more micropython on an esp32 would be appreciated.

  • @cokegen
    @cokegen 6 лет назад

    thank you, excellent tut

  • @khalidtubail
    @khalidtubail 5 лет назад

    thanks a lot, very useful video, appreciated.

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

    Very good and funny videos bring a great sense of entertainment!

  • @GlennHamblin
    @GlennHamblin 5 лет назад +2

    Awesome vid man. I need to learn micro python, well python for that matter. :-)

  • @jamescullins2709
    @jamescullins2709 6 лет назад

    That was very well done. I would like to see roatry encoder and i2c LCD.

  • @RaadYacu
    @RaadYacu 7 лет назад

    Very nice tutorial

  • @MartinBgelund
    @MartinBgelund 6 лет назад

    Thanks for a great video!
    I'd like to see more on the motion detection+sound playing setup.
    I'd also like to see more on selecting which ESP32 board to choose - there are a lot to pick from, and how would I know if it's better to buy a Wemos Pro ESP32, than a Wemos Lolin for example? A basic selection-howto would be great.
    And then something on powering the ESP32 - which batteries to choose.
    And finally: Controlling motors with ESP32 - Servos, stepper and DC gear motors, and which motor controllers to use.

    • @cad3175
      @cad3175 6 лет назад

      Martin Bøgelund ...is that all, come on you can do better than that ...

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

    Man this is a godsend

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

    This was a great tutorial !! i am new to the micro stuffs and your videos helped me alot to understand the things.
    i would like to see how to read UART data from sensor using esp32 and micropython.
    Thank you.

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

      Thanks for the feedback! I suggest you look at my Micropython JQ6500 repo. It uses the Micropython UART library to read and write from an ESP32 to an MP3 module.
      github.com/rdagger/micropython-jq6500

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

    useful stuff. Thanks!

  • @terjemah_alquran
    @terjemah_alquran 5 лет назад

    exelent... i like it. thank you. absoutely i will try it soon

  • @cad3175
    @cad3175 6 лет назад

    ..very nice video well done, micropython is really cool, thanks for sharing man, much appreciated. Any videos you could cover with micropython and the esp32 would be great, would encourage people to start using this language, the C based esp32 IDF environment seems daunting for the average person, thanks again :)

  • @rverm1000
    @rverm1000 5 лет назад

    That was a cool video. I haven't used mycrophython yet, but I have the pi and several esps at doing nothing at the moment.
    Can you do a video using using ADA fruits micro python, command line interface arduino implemented with you current video. To see if they all can be tied together.

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

    Great ! Thank You!

  • @Gaatech
    @Gaatech 5 лет назад

    Thanks for sharing

  • @akshaysreekumar1997
    @akshaysreekumar1997 6 лет назад

    Please make a video on programming esp32 using micropython in PC and webserver explaining all the various ways to code such as using subdirectories like modules and scripts

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

    I think a video using the TTGO T-Dispay board would be goid. It has both a battery connector and a small color LCD on it. Working code for Arudino is out but getting a version of that in python would be nice. I have a few I just got for under $7 each.

  • @berndgunther3782
    @berndgunther3782 6 лет назад

    Hi,
    great tutorial. I would like to see more tutorials especial on bluetooth.
    Bernd

  • @HasanainShuja
    @HasanainShuja 5 лет назад

    Sweet this tutorial was clear and easy to understand. Can you do more videos of micro python with esp32 using the esp now protocol and sending analog values between two esp32s? Thanks again

    • @rdagger
      @rdagger  5 лет назад

      I might be wrong, but I don't think espnow has been implemented yet in MicroPython. I am looking into solutions for mesh networks and low energy communication.

  • @yekutielbenheshel354
    @yekutielbenheshel354 6 лет назад +2

    Please create the series you mentioned. I am very interested in learning how to connect sensors to the ESP32.

    • @rdagger
      @rdagger  6 лет назад

      There is a part 2: ruclips.net/video/_vcQTyLU1WY/видео.html
      and I will probably make more.

  • @shanmuganathanca245
    @shanmuganathanca245 5 лет назад

    Hi! Nice one. Can you post some OTA examples? ... Thanks

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

    Mr Cheung, I noticed you have hydronics videos. Can these arduinos be applied to an automated setup, and if so what would be a brief example of this. Many thanks.

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

    I would like to see using a module for MAX31855KASA for reading a thermocouple sensor thanks good job

  • @drew5134
    @drew5134 5 лет назад

    Please make a video for pm2.5 air quality sensor + dht22 +tft display + send data to UART using miropython. Thanks

  • @operculum
    @operculum 6 лет назад

    This is a real great start in micro python and ESP32. I am totally new to this and tried this a few weeks ago and it worked well. I wonder if the python upgrade has broken it tho as I am now getting no output from
    dmesg | grep ttyUSB
    and
    esptool.py --port /dev/ttyUSB0 flash_id
    says
    No such file or directory: /dev/ttyUSB0
    looking in /dev there is indeed no ttyUSB files at all.

    • @rdagger
      @rdagger  5 лет назад

      Sorry for the slow response. Your reply was flagged as spam. RUclips thinks .py is a hyperlink. Were you able to resolve USB issue? If so, what was the problem?

  • @rakeshm3063
    @rakeshm3063 5 лет назад

    This worked

  • @MrRicardosgeral
    @MrRicardosgeral 6 лет назад

    nice video
    I would like to see the ESP32 being used to receive readings from analog sensors (like the pressure sensor where you used the ADS1115) and send it to the pi or to google sheets.
    thanks

    • @rdagger
      @rdagger  6 лет назад +1

      In part 4 of this series I demonstrate how to read a SoftPot using the ESP32 ADC: ruclips.net/video/a7DrFqqu-78/видео.html

  • @raghudatheshgp6231
    @raghudatheshgp6231 6 лет назад

    Like to see more video on esp32 RPI interfaceing using MQTT CoAP protocols

  • @nevleah7736
    @nevleah7736 7 лет назад

    Just obtained an espwroom32 board and watched your micropython video. Excellent, thank you very much! Will this board interface with Cayenne and how safe is it?

    • @rdagger
      @rdagger  7 лет назад

      Sorry I don't know if the ESP32 will work with Cayenne. It's not on their list of supported microcontrollers so I would guess no.
      By safe are you referring to security? If so the MicroPython firmware is still relatively new. I don't think SSL is supported yet.

  • @SineHacker
    @SineHacker 6 лет назад

    Thanks so much for this video! My first experience with MicroPython! I've worked through it to the point of creating the Neopixel script, I don't have a Neopixel ;) Side note - I run my Pi headless, so I wonder if there is a nice command to download the ESP32 firmware via command line? I'm sure there is - I used scp to transfer it over from my Mac. I have an ESP32 with built in OLED so I am definitely going to that tutorial after getting to grips with the basics :)

    • @rdagger
      @rdagger  6 лет назад +2

      You can use wget to download the firmware.

    • @SineHacker
      @SineHacker 6 лет назад

      Great thanks, I tried this tonight, much better :)

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

    I would love to learn to use a ESP32 Cam to send video to a Raspberry Pi Zero W over a local WiFi network. I am a newbie to MicroPython and need to progress my skills for a project I am planning for myself and a duplicate for a friend. Your help would be greatly appreciated. Maybe even a link to existing code if you have it please.

  • @Silver_jacquard
    @Silver_jacquard 5 лет назад

    Try to make video Arduino vs ESP32
    ESP32 can be program by pc?

  • @hiddnheiziger
    @hiddnheiziger 6 лет назад

    Thanks for the awesome Tutorial!
    Don't forget to do a "sudo usermod -a -G dialout $USER" then log off and relogin.
    Otherwise rshell will not be able to connect to the Board...

    • @rdagger
      @rdagger  6 лет назад +1

      Thanks. The usermod command is not necessary assuming you are using the latest version of Raspbian.

    • @hiddnheiziger
      @hiddnheiziger 6 лет назад

      Ah ok. I was using Ubuntu 16.04 on a VM

  • @laurenceschenk9812
    @laurenceschenk9812 5 лет назад

    Fantstic video. Excellent presentation. Keep them coming! ESP32 seems like the new Arduino. Any thoughts on the uPyCraft IDE? A video on that would be great if you think that that IDE is the way to go.

    • @rdagger
      @rdagger  5 лет назад +1

      Thanks for the feedback! I think uPyCraft IDE is a great tool to get started. However, the IDE is very rudimentary. I prefer to use Atom or VS Code for writing software because of the linters and abundant extensions. Both provide FTP extensions to upload your code directly to a device such as an ESP32. The LoBo build of MicroPython comes with built-in FTP. uPyCraft IDE provides a handy GUI to manage files although the last time I checked it had some trouble with folders. When working with a large volume of files or folders I prefer FileZilla.

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

      @@rdagger Thanks for this too. I just installed Atom.

  • @23TrevorE
    @23TrevorE 4 года назад

    I'm desperate to find a tutorial of how to use the Sparkfun ESP32 Thing with Mozilla IOT to do some home automation. I would be eternally grateful if you could do a video on this.

  • @eriklaken1025
    @eriklaken1025 6 лет назад

    Thank,s

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

    excellent tutorial, what about one showing how to read and display data from a DHT22 sensor back into the raspberry

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

      That's the next video in this series: ruclips.net/video/_vcQTyLU1WY/видео.html

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

    I would like to see how to use multiple cores of esp32 using micropython . Thankyou

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

    Hi, it's great video, I have a question need your help: how to get CPU usage and Memory idle in ESP32 running that using micropython ?

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

      The gc and micropython libraries have methods to get memory usage:
      docs.micropython.org/en/latest/library/micropython.html#micropython.mem_info
      docs.micropython.org/en/latest/library/gc.html#gc.mem_alloc
      I'm not aware of any CPU usage methods nor do I think they would be very meaningful because it's running on a microprocessor. I recommend you ask your question to the MicroPython forum for a more detailed response:
      forum.micropython.org/

  • @chrisw1462
    @chrisw1462 5 лет назад +2

    I wouldn't worry about your camera skills - just about everyone has issues trying to record LEDs of any color.

  • @testbed5290
    @testbed5290 5 лет назад

    Could you elaborate on the best practice of connecting ground first when connecting a device and disconnecting ground last when removing. Thanks.

    • @rdagger
      @rdagger  5 лет назад

      Best practices would be to connect everything with the power off. If you have to connect a device such as a NeoPixel to a live circuit then I recommend hooking up the grounds first to avoid the possibility of exposing a signal line to a higher voltage. In general it is a good practice to hook up grounds first except when jump starting a car.

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

    I like your MicroPython videos. I'm following along and have a question. I'm using an Adafruit Huzzah ESP32 board which doesn't have a 5v pin to attach the neopixel. Is there another way to do this? The Huzzah32 learn guide said something about using the USB or BAT pin along with an additional regulator. What do they mean? Any help would be appreciated. Thanks.

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

      The USB pin should be 5V.

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

      @@rdagger Thanks for the reply and info. I tried the USB pin, but got some weird results. The neopixel flickers really fast as it's cycling through the colors. So, I tried the BAT pin, and that smoothed out the color change to like what's in your video.

  • @bryanbaring6124
    @bryanbaring6124 5 лет назад

    very good to watch. but sir can i bluetooth 4 esp 32 simultaneously to one rasberry pi ? or any way that make it possible?

    • @rdagger
      @rdagger  5 лет назад

      The LoBo build of MicroPython for the ESP32 supports Bluetooth. Unfortunately, BLE has not been implemented yet.

  • @Xanto131
    @Xanto131 5 лет назад

    Where du you get the neopixel library from? I need a neopixel.py on my board right?

    • @rdagger
      @rdagger  5 лет назад

      No, NeoPixel libraries are built into both the MicroPython and the LoBo builds:
      docs.micropython.org/en/latest/esp8266/tutorial/neopixel.html
      github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki/neopixel

  • @MikeNewham
    @MikeNewham 5 лет назад

    Great tutorial. Finally got it working..
    Now trying to tweak code to allow a full 8 LED NeoPixel Strip to light up. Not getting much success thus far..
    I tried changing your code by amending and adding the following lines -
    # Amount of Pixels
    np = NeoPixel(Pin(13), 8)
    # In the middle
    np[0] = hsv_to_rgb(hue, 1, .15)
    # all the way to -
    np[7] = hsv_to_rgb(hue, 1, .15)
    # and at the end
    np[0] = (0, 0, 0) # Turn off NeoPixel
    # all the way to
    np[7] = (0, 0, 0) # Turn off NeoPixel
    Will keep plugging away :)

    • @rdagger
      @rdagger  5 лет назад +1

      Are you getting an error message or just nothing? I recommend you also try the LoBo MicroPython build. LoBo has more robust support for NeoPixels: github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki/neopixel
      I found that occasionally it's necessary to adjust the _timings_ property with some NeoPixels. Also make sure you have an adequate power supply and good quality short USB cables.

    • @MikeNewham
      @MikeNewham 5 лет назад

      @@rdagger It was my code - will post error messages next time. Enjoying your tutorials. Keep up the good work!

  • @jayceclarke4684
    @jayceclarke4684 6 лет назад +1

    Hi mate. Great vid. ive been following it. However
    I get a hang up when using rshell into the esp board (it just says connection and then does nothing). I am 8266 version is there something different?

    • @rdagger
      @rdagger  6 лет назад

      Did you build the firmware yourself or are you using a daily build from MicroPython.org (if so which version)? Did you specify address 0x0 when writing the flash? Which ESP8266 board are you using?

    • @lowkuleeuwner2815
      @lowkuleeuwner2815 6 лет назад

      I have the same problem. Using an ESP12S. First time I worked through your tutorial everything worked perfectly, I tried updating the uPython and now nothing works anymore. Any resolve yet?

    • @lowkuleeuwner2815
      @lowkuleeuwner2815 6 лет назад

      Using uPython for esp8266, tried most versions in combination with adress 0x0 and 0x1000 no luck

    • @rdagger
      @rdagger  6 лет назад

      What build are you using? Did you erase the previous firmware prior to writing the new firmware? What error message are you getting?

    • @lowkuleeuwner2815
      @lowkuleeuwner2815 6 лет назад

      i tried using both the esp32 and esp8266 build and all versions. Erased flash before writing. Not getting any errors, as soon as I try connecting with rshell it just hangs

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

    Can we use python to program this ESP32?

  • @randmorf
    @randmorf 5 лет назад

    If your program uses a 3rd party library module file, how do you put that file onto the ESP32/MicroPython filesystem so that it will be found when you run/(compile) the program? For example, my program which imports the "max7219" library module gives me this error message:
    ImportError: no module named 'max7219.py'
    I have tried to copy this file onto the filesystem, and can see it on the filesystem, but everytime I try to run it I get the above error message. If I embed the driver in my program instead of importing it, the program runs fine. I'm using the "Thonny" IDE and "rshell" utility. Any tips?

    • @rdagger
      @rdagger  5 лет назад

      I haven’t tried Thonny. Generally speaking you just have to put the Python library in the same folder as your program.

  • @ganamaran
    @ganamaran 6 лет назад

    Hello, I need to monitor my aquarium from remote location. Need to know what kind of interface needed for camera HW/SW. Thanks.

    • @rdagger
      @rdagger  6 лет назад

      I don't have any experience working with cameras on the ESP32. The OpenMV camera looks promising:
      openmv.io
      Adafruit also has a couple of TTL serial cameras that might work. A Raspberry Pi might afford better camera options.

    • @rdagger
      @rdagger  6 лет назад

      Here's another possibility: github.com/namato/micropython-ov2640

  • @Yura1979
    @Yura1979 6 лет назад

    Could you give links for good documentation for ESP probes phyton programming?

    • @rdagger
      @rdagger  6 лет назад

      Not sure what you mean by ESP probes. Are you asking about exhaust sensing probes? If you are looking for help getting started with the MicroPython language then any Python 3 tutorial would be a great start. Here's a link: ruclips.net/video/oVp1vrfL_w4/видео.html

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

    i have a problem. when i started rshel, this not recognized my esp32.

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

    Hello. I just saw this video this week. I followed all the instructions in the video with the ESP-WROOM-32 board(s) the erase worked, the loading of the code (.bin) on the webpage appeared to work. But, when I got to the repl part to connect to USB0 it said 'No MicroPython boards connected - use the connect command to add on'. I tried two different codes from the page. i get the same thing on the repl.

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

      @rdagger68 Ignore that msg, I saw the other reply you had mentioning that starting address to be 0x1000. It worked. Thanks.

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

    what it the other device in the usb. Like a bluethooth mouse and keyboard device?

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

      I don't understand your question, but if you are trying to emulate a USB keyboard or a Bluetooth mouse then I recommend you take a look at CircuitPython because it offers excellent Bluetooth support and USB HID. Here are 2 tutorials:
      learn.adafruit.com/circuitpython-essentials/circuitpython-hid-keyboard-and-mouse
      learn.adafruit.com/ble-hid-keyboard-buttons-with-circuitpython

  • @johngarcia9870
    @johngarcia9870 6 лет назад

    Excellent tutorial but I do not know what I'm doing wrong. but when I disconnect the pc cable, the communication between the devices is lost. I'm not supposed to have connected the two devices. the communication would not be done by wifi?

    • @rdagger
      @rdagger  6 лет назад

      When the USB cable is connected to the ESP32 it provides power. How are you providing power when the USB cable is disconnected? Are you using a battery or power supply? What is the voltage and current? Which pins on the ESP32 are you using for power?

  • @jean-francoispedneault3632
    @jean-francoispedneault3632 4 года назад

    Thank you very much great tutorial! Everything works fine! ...except I get this error from the python code MduleNotFoundError:No module 'machine' ? ...the led stays still to green. and by the way what means the c in the while loop : for c in spectrum : hue = c/2048.0 ? thanks for your time.

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

      What version of MicroPython are you running? Which ESP32 board are you using?
      c is for color (loop through every color in spectrum)

    • @jean-francoispedneault3632
      @jean-francoispedneault3632 4 года назад

      @@rdagger Thank you for your quick answer it is really appreciated! Chip is ESP32D0WDQ6 (revision 1) | esptool.py v2.8. I realised that I had python 2.7. I did install python 3.7 that way : installvirtual.com/install-python-3-7-on-raspberry-pi/ Then tried to install micropython machine that way : pip install micropython-machine But I still get : IOError: [Errno 2] No such file or directory: '/tmp/pip-install-yjBxCU/micropython-machine/setup.py'

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

      Sounds like you are trying to install MicroPython on your computer instead of the ESP32. The MicroPython machine library is built in to MicroPython. If you install MicroPython on your ESP32, the machine library will automatically work. Please follow the steps on my website: www.rototron.info/raspberry-pi-esp32-micropython-tutorial/
      The only tools that will require pip install are esptool and rshell. If you need to use libraries that are not included with MicroPython, then you just need to copy the python libraries to the flash storage on the ESP32.

  • @Thebloggermustdie
    @Thebloggermustdie 7 лет назад +3

    Could you please make a video on how to do a web enabled pet Feeder using a using a 8266, a stepper motor and a cereal Dispenser? Thank you.

    • @cad3175
      @cad3175 6 лет назад +5

      Thebloggermustdie ..haha yeah and could you pick up a few messages from the grocery store for me on your way home....oh yeah and could you take out my trash for me, any time after 9pm....oh and could you mow my lawn please, I left the petrol can near the shed door...oh and could you pass the remote to me please, while you're standing....oh and....f***-off [slams door].... Some people have no shame lol

    • @michaela5586
      @michaela5586 5 лет назад +1

      @@cad3175 What is so bad about making a pet feeder that works via a web browser?

    • @aaronacj
      @aaronacj 5 лет назад

      @@michaela5586 I think its the fact that he just wants it done vs maybe he tried to do it himself and maybe had a question on something he got stuck on. The pet feeder is not the premise of the reply.

  • @JorgeBlancoPhotography
    @JorgeBlancoPhotography 5 лет назад

    Does anybody know the status of micro-Python and the esp32, does it fully support the esp32 ? Can't seem to find the status update for this...

    • @rdagger
      @rdagger  5 лет назад

      It is not fully supported but new features are being regularly added. Unfortunately I'm not aware of any road map and the development is currently fragmented between MicroPython, Loboris and Pycomm. I recommend you ask your question on the MicroPython forum. Damian could probably give you a better answer.
      forum.micropython.org

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

    Hello,
    While using "Thonny Ide", I get memory error when I include library. Can you help?

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

      which library? what's the exact error message?

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

      @@rdagger blynk library , example MemoryError: Memory allocation failed, allocating 136 bytes.

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

      @@ScenicJourneysHub I haven't used blynk but you probably don't have enough memory on your board. Check out this post on the MicroPython forum: forum.micropython.org/viewtopic.php?t=7545

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

    Hi, thank you very much for this video. I'm using Windows Subsystem For Linux with Ubuntu 18.04, but when I connect the ESP32 in the USB port and type the dmesg | grepp ttyUSB nothing is happening. I have searched a lot on google and can't find any help. Thank you very much.

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

      I have never used WSL and I don’t know how it handles USB devices. I’d guess that a USB to serial device would be mapped to a serial port. Check the Windows Device Manager for the com port of your ESP32 and then see if there is a corresponding WSL serial port. For example, if the ESP32 is mapped to COM3, check WSL for ttyS3.

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

      @@rdagger I discivered that WSL doesn't support USB serial device. Thanks. Now I'm trying to compile micropython with Microlad module but without success.

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

    How about the Photon. That is a better/new device.

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

    FYI, in 2021, when flashing an ESP32 board, I had to use the flash address as 0x1000 instead of 0x0. If I used 0x0 the board was in a crash loop.

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

    I'm trying to setup an ESP8266 with Micropython, and everything works as on the video but it keep saying 'Trying to connect to REPL". Any idea why?

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

      For the ESP8266 check out docs.micropython.org/en/latest/esp8266/tutorial/intro.html

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

    What is the name of usb you use btw pi and esp32. what kind

  • @jayaramkrishnakumar68
    @jayaramkrishnakumar68 5 лет назад

    can you please provide us any link where to buy the esp32 board you used in this video and I belong to India.

    • @rdagger
      @rdagger  5 лет назад

      I bought it on eBay 2 years ago. Make sure you get an ESP32 that has PSRAM (at least 4MB).

    • @jayaramkrishnakumar68
      @jayaramkrishnakumar68 5 лет назад

      @@rdagger I am much confused to buy online so can you please help me with a link to buy .
      # I am new in using microcontroller so need your help.

    • @rdagger
      @rdagger  5 лет назад +1

      The ESP32's I bought are no longer sold. I haven't purchased one in over a year. I don't want to recommend something that I have not purchased. Just make sure you get an ESP32 Wrover with at least 4MB RAM of PSRAM. Loboris has a list of board vendor links on his wiki: github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki

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

      @@rdagger Thank you! That is what I was looking for!

  • @HendraKusumahiot
    @HendraKusumahiot 7 лет назад

    Is it already support mqtt? tried mine last week. But it only support http protocol for IoT so far

    • @rdagger
      @rdagger  7 лет назад +4

      I've only done cursory tests, but I was to able get MQTT working on my generic ESP32 running MicroPython. Both publishing and subscribing worked. On the ESP32, I used the umqtt.simple: github.com/micropython/micropython-lib/tree/master/umqtt.simple
      I tested it using a Raspberry Pi running Mosquitto.

    • @HendraKusumahiot
      @HendraKusumahiot 7 лет назад

      well great then. gonna try it soon. I make my own video too regarding micropython for the esp8266, but it's in Bahasa Indonesia. This tutorial could be the next content for my Indonesian viewer. Thank you very much

    • @emddom
      @emddom 6 лет назад

      the same library worked for publishing temperatures from a DS18B20 using Feather HUZZAH ESP8266 to a Mosquitto broker (mqtt) running on an RPi 3

  • @ML.ArtificialIntelligence
    @ML.ArtificialIntelligence 2 года назад

    can I implement this tutorial with esp8266?

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

      There are some differences and I don’t use the ESP8266 because of the limited memory. Please refer to the official MicroPython tutorial for the ESP8266: docs.micropython.org/en/latest/esp8266/tutorial/intro.html

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

    Sudo : pip3 : command not found, any help ?

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

      The latest version of Raspberry Pi OS should come with pip. If you are using the lite version or some other version, then you can install pip using the following:
      sudo apt-get update
      sudo apt-get upgrade
      sudo apt-get install python3-pip

  • @xyottax4925
    @xyottax4925 5 лет назад

    Module RPI.GPIO please

  •  7 лет назад

    the ESP has a compatible library for hosting a simple web server how can i add a password to it to secure it a little?

    • @tasnimkhalid8049
      @tasnimkhalid8049 7 лет назад

      Great Video! it would be great to see how you would transfer sensor information from the ESP to central Rpi through WiFi. is it possible to write own Python module and import it and use it in micro python?

    • @rdagger
      @rdagger  7 лет назад +2

      Yes, you can write your own MicroPython modules and copy them to the ESP32. Other MicroPython programs on the ESP32 can import and use them. The 2 examples at the beginning of the video use separate MicroPython libraries that I created (LCD display library and a JQ6500 sound module library). Both are available on my GitHub site: github.com/rdagger
      There is also a large collection of core Python libraries ported to MicroPython available at github.com/micropython/micropython-lib/

    • @rdagger
      @rdagger  7 лет назад

      I’d ask the experts over at forum.micropython.org because I have not tried setting up web server authentication on an ESP32 using MicroPython. Please post a link because I'd be interested in the responses. I’d probably go with a VPN solution or possibly a password protected Ngrok tunnel. Seems like a Raspberry Pi would be an easier platform with respect to web security.

    • @tasnimkhalid8049
      @tasnimkhalid8049 7 лет назад

      rdagger68
      Thanks for the quick reply. I have SHT10 sensor that works fine with sht1x python library on the raspberry pi. However, it u can't make it work on the ESP32 using micro python, so it would be great if could show some guidance on that :-)....

    • @rdagger
      @rdagger  7 лет назад

      There's a MicroPython code snippet for an SHT10 posted on the Pycom forum: forum.pycom.io/post/4618
      Basically you convert all RPi.GPIO references to machine.Pin

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

    how did you learn to code?

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

      I taught myself programming at a young age. My parents had a very primitive computer. The paper instructions included basic code for several simple games. I typed in the code and experimented by making modifications. I wanted to make my own games which I did and shared with my friends. This was before the Internet.

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

      @@rdagger oh that's nice.. so that's why you are very good at it.. I like this mircropython series.. I just learned about it a couple weeks ago python on microcontrollers and just started to study programming , studying python currently everything is so overwhelming but it's very cool .. Do you have a video of creating a mobile app to read the sensor and maybe turn on and of the LED?

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

      I created a mobile app using React Native and Expo for a solar powered project: github.com/rdagger/Expo-Solar-Tracker

  • @Kevin_Mulder
    @Kevin_Mulder 5 лет назад

    can someone let me know how to delete a file from the esp32?

    • @rdagger
      @rdagger  5 лет назад

      You can use the rm command with rshell to delete files. For example: rm /pyboard/test.py
      You can also use delete files from the REPL by importing os and then using: os.remove('test.py')

  • @DenisOvod
    @DenisOvod 6 лет назад

    Why not to use 3.3v pin ?

    • @rdagger
      @rdagger  6 лет назад

      If you're referring to NeoPixels, the WS2812B datasheet shows a supply voltage range of 3.5V - 5.3V. Running at 3.3V would be out of spec. It might work with some LED's but your mileage may vary.

  • @darios.8787
    @darios.8787 5 лет назад

    Sorry man, what's Raspberry Pi? What are you using it for?

    • @rdagger
      @rdagger  5 лет назад

      www.raspberrypi.org/help/what-%20is-a-raspberry-pi/

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

    You can now connect ESP32 to WebREPL with the latest stable firmware
    www.techcoil.com/blog/how-to-setup-micropython-webrepl-on-your-esp32-development-board/

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

      That’s true, but I find the webrepl rather clumsy. You can only transfer 1 file at a time (no folders), it’s buggy and the security is very weak.

  • @aaronacj
    @aaronacj 5 лет назад

    When i try to run dmesg | grep ttyUSB nothing happens...

    • @rdagger
      @rdagger  5 лет назад +1

      That would indicate that the Pi doesn’t see any USB devices. It could be a bad USB cable or a bad ESP32 board.

    • @aaronacj
      @aaronacj 5 лет назад

      @@rdagger Thanks for the quick reply! i discovered what was wrong... all 4 of my cables are cheap china power only cables. Had to rig a data cable from one of my sons toys... works now. Thanks for the great walk through.

  • @nguyendangbinhnguyen4724
    @nguyendangbinhnguyen4724 6 лет назад

    I got error no module named 'RPi'

    • @rdagger
      @rdagger  6 лет назад

      What Raspberry Pi are you using? What version of Raspbian are you using?

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

    right now.. i cannot get the dmesg | grep ttyUSB to output

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

      If dmesg | grep ttyUSB returns nothing then you may have a bad USB cable or a bad ESP32. You can test the board using a serial connection. See my ESP32 repair video: ruclips.net/video/OrQWos9VcgM/видео.html

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

      @@rdagger correct.. it runs nothing

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

      @@rdagger watching it as of now

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

      @@rdagger what type of wires are those?

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

      @@rdagger do you think the wires will do or do i need to buy an extra chip?. will this all depend after wires in and a reboot on the vid?