ESP32 MicroPython OLED Display

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 มี.ค. 2020
  • OLED display of resolution 128 x 64 , 0.96 in, blue ,I2C protocol is iused in this demo with ESP32 Micropython.
    OLED is built on SSD1306 IC , and a ssd1306.py library is available for easy interface.
    github.com/micropython/microp...
    CODE DOWNLOAD :
    www.alselectro.com/files/micro...
  • แนวปฏิบัติและการใช้ชีวิต

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

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

    One of the very best for MP and OLED thank you my friend Saravanan!

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

    Awesome explanation with very useful info - saved me a lot of time. Thanks!

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

    Thank you sir, this is just what I was looking for today.

  • @electronic7979
    @electronic7979 4 ปีที่แล้ว +2

    Useful video 👍

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

    Grande tutorial. 😊👌

  • @Naturel659
    @Naturel659 2 ปีที่แล้ว +1

    Thank you

  • @qzorn4440
    @qzorn4440 9 หลายเดือนก่อน

    Very nice. 🌅 Thank you.

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

    As I was using a PyBoard instead of an esp32 I was worried these instructions wouldn't work for me, but with minor modifications it worked a dream. This video is awesome!

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

      Can you please tell me how you modified it? Thanks!

    • @wrightkevin9000
      @wrightkevin9000 2 ปีที่แล้ว +1

      @@maheswarkk1034 Hopefully you can extract the code you need from this:
      '''
      Step 1: Get the current system time
      Step 2: Write out the current time to the microcontrollers's rtc object
      Step 3: Synchronize the rtc object with the ds3231 module
      Step 4: Within a loop write out the ds3231 get_time value to an oled display
      Step 5: For now print out the hours, minutes and seconds
      Step 6: Within the loop calculate days until retirement
      '''
      from utime import sleep
      from pyb import RTC
      from ds3231_pb import DS3231
      import ssd1306
      import utime
      def days_between(d1, d2):
      d1 += (1, 0, 0, 0, 0) # ensure a time past midnight
      d2 += (1, 0, 0, 0, 0)
      return utime.mktime(d1) // (24*3600) - utime.mktime(d2) // (24*3600)
      retirement_date = (2021, 9, 10)
      rtc = RTC()
      i2c = machine.I2C(1) # Connected on 'Y' side Y9 clk Y10 data
      ds3231 = DS3231(i2c)
      #ds3231.save_time() # Set DS3231 to match Pyboard RTC
      oled = ssd1306.SSD1306_I2C(128,64, machine.I2C(1))
      while True:
      oled.fill(0)
      print('[rt]', rtc.datetime())
      print('[ds]', ds3231.get_time())
      ds_time = ds3231.get_time()
      today = (ds_time[0], ds_time[1], ds_time[2])
      diff = days_between(retirement_date, today)
      print('diff =', diff)
      time_text = "%02d:%02d:%02d" % (ds_time[3], ds_time[4], ds_time[5])
      print("date text is:" + time_text)
      oled.text(time_text, 0, 10)
      #oled.text( str(ds_time[3]) + ':' + str(ds_time[4]) + ':' + str(ds_time[5] ), 0, 10)
      oled.text( 'days to ret:' + str(diff) , 0, 20)
      oled.show()
      sleep(5)

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

      @@wrightkevin9000 Wow! Thanks so much! Did not expect you to reply because its been a year. Was looking for this. There is not a lot of tutorials explaining things about the pyboard.

  • @PeterEvans-english-adventure
    @PeterEvans-english-adventure ปีที่แล้ว

    This is great. I can work well with the I2C bus but I am having trouble with getting SPI to work. Do you know where I could get such a video as this but for SPI in micropython on an ESP32 WROOM

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

    Trying to program an epaper, with micro python esp32, do you have a tutorial for that?

  • @rutwiktaday8717
    @rutwiktaday8717 4 ปีที่แล้ว

    Sir is this the method where we can save any library in micropython?

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

    Sir. Can I use this method with a micro:bit?

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

    AttributeError: 'SSD1306_I2C' object has no attribute 'fill_rect'

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

    I have a problem, when i run it, the Thonny Shell said " Warning: I2C(-1, ...) is deprecated, use SoftI2C(...) instead" and when use SoftI2C, in the shell "NameError: name 'SoftI2C' isn't defined". Can you help me to fix it. I will be happy if you can help me