ESP32 with I2C OLED and Temperature Sensor

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ก.ย. 2024
  • Design & Order on EasyEDA, PCB+SMT $10 Off: easyeda.com/ed...
    Get coupon & Join JLC&EDA Group: jlcpcb.com/EDA
    How easy is it to get a 128x64 OLED and a Si7021 temperature and humidity sensor working with the ESP32?
    randomnerdtuto...
    randomnerdtuto...
    Subscribed to my 2nd channel? Watch all my 3 minute videos on Julian's Shorts: / @juliansshorts
    Interested in my new garden workshop? Follow the entire build on Julian's Shednanigans:
    / @juliansshednanigans
    Join me on Odysee/LBRY: lbry.tv/$/invi...
    Octopus Energy referral link: share.octopus.energy/aqua-birch-918
    (We each get £50)
    #ElectronicsCreators

ความคิดเห็น • 75

  • @DustinWatts
    @DustinWatts 3 ปีที่แล้ว +43

    #include searches for the library in your library folders and #include "" first looks in the sketch folder. So basically the difference between local and global include.

    • @JulianIlett
      @JulianIlett  3 ปีที่แล้ว +1

      Perfect - thanks Dustin. I have so much to learn :)

    • @StevenIngram
      @StevenIngram 3 ปีที่แล้ว +5

      Great description. The only thing I'd add is that the "" can contain a path to a .h file. It doesn't necessarily have to be in the compile folder. It just defaults to PWD if no path is provided. Anyway, I find this provides a simple means of organizing your personal libraries. :)

  • @Mark1024MAK
    @Mark1024MAK 3 ปีที่แล้ว +3

    Nice to see a video on you using the ESP32 👍
    I look forward to seeing your next video on this 😉

    • @JulianIlett
      @JulianIlett  3 ปีที่แล้ว +1

      I'm also interested in the Arduino RP2040 Nano thingy and RPi Pico. So much to do :)

  • @dogastus
    @dogastus 3 ปีที่แล้ว

    I'm so pleased you're trying the ESP32. I asked if you might quite a few months ago so nice to see my wish coming true!

  • @postiemania
    @postiemania 3 ปีที่แล้ว

    I just ordered a few of these, some with cameras today. Lo and behold Julian makes an Esp32 video == compelled to watch as this is almost the identical project I am building.
    Thanks Julian you have saved me some time.

  • @km5405
    @km5405 3 ปีที่แล้ว +1

    i designed my own esp32 board with battery management built in for wearable sensor interfaces and sensor projects :-) esp32 module is very cheap and powerfull

  • @grahameida7163
    @grahameida7163 3 ปีที่แล้ว +5

    All my esp32 sensors report back to a MQTT server, gives you loads of flexibility for control and logging.
    Look up the IOTstack for the raspberry pi, very easy to set up

  • @Magic-Smoke
    @Magic-Smoke 3 ปีที่แล้ว +5

    Hi Julian, for what its worth, you can use almost any pin to drive I2C. You may have to declare those pins when you call your driver library though

    • @JulianIlett
      @JulianIlett  3 ปีที่แล้ว +3

      Hi John - yeah I read about that. For the moment, I'm trying to keep it as simple as possible.

    • @msindisimtengwane9456
      @msindisimtengwane9456 ปีที่แล้ว

      How would I do this? I am new to these boards and I am using a ESP32-C3. What line of code would I need to use to declare GPIO5 and GPIO6 when calling the library?

  • @jumadhaheri
    @jumadhaheri 3 ปีที่แล้ว +1

    You can use ESPnow for point to point (not WiFi)

  • @briandurward
    @briandurward 3 ปีที่แล้ว +2

    Would it be worth exploring tasmota?

  • @roelskiunplugged1134
    @roelskiunplugged1134 3 ปีที่แล้ว

    Next try the inbuilt touch for a few pins!

  • @ShawankumarParida
    @ShawankumarParida ปีที่แล้ว

    Is it possible to connect two oled displays to esp 32 and display different data on screen

  • @svengaefgen5909
    @svengaefgen5909 3 ปีที่แล้ว +1

    The NRF24L01+ works on an ESP32 too.

    • @piconano
      @piconano 3 ปีที่แล้ว +1

      Fair enough. Why would anyone do that tho?

    • @JulianIlett
      @JulianIlett  3 ปีที่แล้ว +4

      The nRF in mesh mode could be a good alternative to Zigbee. The ESP32 could then act as a nRF mesh to WiFi bridge :)

    • @piconano
      @piconano 3 ปีที่แล้ว +2

      @@JulianIlett Doesn't ESPNow support all that?

  • @qzorn4440
    @qzorn4440 2 ปีที่แล้ว

    now to us an esp32 master to read modbus rtu input registers from a panel-meter rs486 19200 and display the value 😎 thanks

  • @austinskylines
    @austinskylines 3 ปีที่แล้ว +1

    nice , i made one of these with a DHT22 the other week. i hate the cheap esp though.... never is too stable, web server always goes out

    • @piconano
      @piconano 3 ปีที่แล้ว +1

      I wanted to make one for outside and bought 5x DHT11.
      I didn't check that it's not meant for outside temps like DHT22 is.
      Good thing I got them very cheap before the Corona crap.

  • @piconano
    @piconano 3 ปีที่แล้ว

    I recommend RandomNerdTutorials (Rui Santos) to anyone wanting to learn about ESP32 and ESP8266.
    He has great projects and code.

  • @thekaiser4333
    @thekaiser4333 3 ปีที่แล้ว +2

    Ampere = Celsius?
    Interesting...

    • @Mark1024MAK
      @Mark1024MAK 3 ปีที่แล้ว +2

      The history behind what is shown on the OLEDs is in his older videos. Basically he has only two data values but wanted to show four lines of data on the first OLED. But presumably intended at some point to also have voltage and current. Hence the V and A. Then when testing the second OLED, he just used the bottom two lines from the original code and changed the object to the OLED at the second address…

    • @JulianIlett
      @JulianIlett  3 ปีที่แล้ว +1

      Exactly right. The plan going forward is to attach a INA219 to the transmitter to get the voltage and current data :)

    • @thekaiser4333
      @thekaiser4333 3 ปีที่แล้ว +1

      @@Mark1024MAK - Thank you.

  • @roby3004
    @roby3004 3 ปีที่แล้ว

    Dude pls tell me... Can i run machine learning in esp32 dev board... That same board... Pls tell.. Which is better arduino 33 ble something or esp32 dev board... Pls reply... Can i run tensorflow lite in esp32 dev board.. What are the basic components need to do a machine learning.. In esp32 dev board

  • @fredflintstone1
    @fredflintstone1 3 ปีที่แล้ว

    why not just get the info from the shed on the ESP32??

    • @JulianIlett
      @JulianIlett  3 ปีที่แล้ว +1

      That's the eventual plan :)

    • @fredflintstone1
      @fredflintstone1 3 ปีที่แล้ว

      @@JulianIlett but you spent all that money on PCbs from some Company, it seems strange :-)

    • @JulianIlett
      @JulianIlett  3 ปีที่แล้ว +2

      It really isn't a problem ;)

    • @kevinshumaker3753
      @kevinshumaker3753 3 ปีที่แล้ว +1

      @@fredflintstone1 But @Julian did find out how to do it, get them populated, and find out how reliable they are, all plusses in my book...

    • @fredflintstone1
      @fredflintstone1 3 ปีที่แล้ว

      @@kevinshumaker3753 yes fine but it is chop and change each time?? it is not as though the ESp32 is new FFS

  • @frankowalker4662
    @frankowalker4662 3 ปีที่แล้ว

    I still don't understand why it's called a sketch and not a program. (?)

    • @piconano
      @piconano 3 ปีที่แล้ว +1

      Same carp, different name. Who the F calls a product Arduino? Same "wanting to be different" logic.

    • @PetRatty
      @PetRatty 3 ปีที่แล้ว

      @@piconano I like PI too, just a diffent name

    • @ElmerFuddGun
      @ElmerFuddGun 3 ปีที่แล้ว +2

      Just call it a program and everyone will know what you are talking about. I believe "Sketch" was coined by Arduino to more indicate a program that might not be that optimized by early compilers. A sketch to roughly do what a finished program would.

    • @ElmerFuddGun
      @ElmerFuddGun 3 ปีที่แล้ว +2

      @@piconano - Well the Arduino name seems to have worked as they have sold millions and the Arduino name is well know even to those that don't use them or even electronics for that matter.

    • @frankowalker4662
      @frankowalker4662 3 ปีที่แล้ว

      @@piconano Fair enough, I'll take that explanation. :)

  • @jstro-hobbytech
    @jstro-hobbytech 3 ปีที่แล้ว

    Over-analysis bit yer bum as you're wont to do sir haha

  • @PetRatty
    @PetRatty 3 ปีที่แล้ว +3

    glad you've moved onto the esp chips, to get upto date use the new esp32-s3.

    • @JulianIlett
      @JulianIlett  3 ปีที่แล้ว +7

      As long as it's cheap - Electronics on the cheap is still my channel ethos :)

  • @ElectronicEnigmaZone
    @ElectronicEnigmaZone 3 ปีที่แล้ว +1

    local vs system includes, system includes, "" local to code tree includes

  • @cbartley100
    @cbartley100 3 ปีที่แล้ว +2

    I really like the ESP32 - don't forget it has an RT OS built in, so can do multi tasking.
    Although I do find the Wi-Fi can be a bit ( well a lot) flaky, connects no problem 1st time after boot, but randomly loses signal and then has devils own job to reconnect, usually fails so have to resort to an ESP.restart() to reboot the thing - Annoying !
    My own similar project : th-cam.com/video/3RDv1CY0RKc/w-d-xo.html

    • @PetRatty
      @PetRatty 3 ปีที่แล้ว +1

      Have heard other people say the same. Their was a big batch of chips with problems. In loop check if wifi is connected, if not use .disconnect() and or .reconnect(). I've got 4 here from 1 supplier and 6 from another, same chip, regulator, board layout and design. The 4 brownout when trying to connect to wifi (just about ok at 80Mhz) unless I up the voltage to 5.5v, the other 6 are just fine on usb power. strange things happen

    • @cbartley100
      @cbartley100 3 ปีที่แล้ว +1

      @@PetRatty The batch issue was related to rev 0 chips I think - mine are later ones
      I think I've tried most variations of the wi-fi reconnect logic, as seen on this page
      randomnerdtutorials.com/solved-reconnect-esp32-to-wifi/

    • @PetRatty
      @PetRatty 3 ปีที่แล้ว

      @@cbartley100 I've seen that post, have you tried to set it up with a static ip address. might want to try wifi.setTXPower().
      like I said I've had no problems but 1 of my esp-01's when doing an OTA does slow down when moving it away from the router, only 5 meters it takes sometimes 3 minutes

    • @cbartley100
      @cbartley100 3 ปีที่แล้ว

      @@PetRatty Trying fixed IP now !
      But will be few days yet before I know if its really a fix

  • @RottnRobbie
    @RottnRobbie 3 ปีที่แล้ว

    I don't especially _like_ being that guy, but I am what I am - so I have to ask...
    @1:00 - Why does the left display show 90.9 *PERCENT*, while the right display shows 90.9 *VOLTS*?
    Sloppy coding perhaps?
    And how did nobody else - especially Julian - not notice this?

    • @ethanchu5413
      @ethanchu5413 3 ปีที่แล้ว

      Do you have any proof that the left display shows 90.9 *PERCENT*, while the right display shows 90.9 *VOLTS* or is that just your opinion?

  • @mickeyfilmer5551
    @mickeyfilmer5551 3 ปีที่แล้ว +1

    I'm still trying to get my 62 year old head around arduino code!!

  • @TheDefpom
    @TheDefpom 3 ปีที่แล้ว

    To make programming the ESP32 easier, install a 1uF cap between the Enable and Ground pins, this means you don’t need to press the button to program it from the arduino IDE, you just upload and it works.

    • @JulianIlett
      @JulianIlett  3 ปีที่แล้ว

      Maybe there's one on the board already because it programmed just fine :)

  • @jstro-hobbytech
    @jstro-hobbytech 3 ปีที่แล้ว

    The arduino ide keeps throwing a max7219 compilation error at me at random. Drives me nuts haha

  • @timothepennec4075
    @timothepennec4075 3 ปีที่แล้ว

    Hi, i don't have understand why you change from ATMega 328 to ESP32, for the wifi only ? the identical value for the first screen and the second are the same from the code no ? Or ATmega 328 doesn't have much memory to control the two screen at the same time ? thank you :P

    • @jyvben1520
      @jyvben1520 3 ปีที่แล้ว

      atmega needs external wifi module, esp32 does not, so it might be cheaper than atmega+wifiboard.
      it sure is more powerful, probably has more memory, might even have better sleep powerdrain.

  • @TheMockTv
    @TheMockTv 3 ปีที่แล้ว

    i use a wemos d1 mini with battery shield the bme280 can Temperature/Humidity/Pressure measure and all the data put it over
    the wlan from the wemos d1 in my mysql data base with a php script peer get/post string receive so can i over my webinterface in all my rooms the Temperature/Humidity/Pressure see or over home assistants
    i can not untersand why you it so complicated make, of course i can untersand the you try out it but you wasting so mutch time for a lost way, the'r i can not understand why

    • @jyvben1520
      @jyvben1520 3 ปีที่แล้ว

      he is self educating and may even be educating some others, his time, his choice.
      why are you not using node-red, and do use php ? probably using things you learned before.
      typo :: untersand => understand

    • @TheMockTv
      @TheMockTv 3 ปีที่แล้ว

      @@jyvben1520 I know why I don't use Node Red, it is too confusing, all the lines and buttons, why should I use Node Red when I only have one system, where collect weather data from my apartment and 5 years earlier there was node red not release and one does not say in vain, never changes a running system
      so why should i all my weather sensors new flash to node red if the system run for 5 years and all ther i have self lerning and the path was not esay for me

  • @AK90
    @AK90 3 ปีที่แล้ว

    IoT should be renamed IoS (Internet of Shit) since the security on these devices is a bigger joke than Donald Trump