Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. M5MPy
    M
    • Continue chat with M5MPy
    • Start new chat with M5MPy
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    M5MPy

    @M5MPy

    7
    Reputation
    12
    Posts
    2645
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Location Düsseldorf

    M5MPy Follow

    Posts made by M5MPy

    • RE: MicroPython Clock Task with RTC and NTP sync

      yes, already answered, thanks to @simm

      posted in PROJECTS
      M
      M5MPy
    • RE: [Solved]Where to get basic (offline?) MicroPython firmware with lcd module support?

      Use Lobo's implementation, will work.

      See here :

      https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo

      posted in FACES Kit
      M
      M5MPy
    • RE: hardware FFT on the esp32

      Interesting point : never thought about that since using Motorola (yes, long time ago) and TI DSP with ASM programming for folding memory pages by microcode for FFT.
      What are you trying to do? Audio analysis or lower / higher frequencies?

      posted in FAQS
      M
      M5MPy
    • RE: Is M5Cloud down?

      posted my first MicroPython Code here :

      http://forum.m5stack.com/topic/197/micropython-clock-task-with-rtc-and-ntp-sync

      @daslolo
      So, feel free to compare by yourself with Arduino.
      The "Clock" code does it all for me on displaying time (and date if needed), and if synced to NTP with green or red time digits. Just as a task in the background.

      posted in FAQS
      M
      M5MPy
    • MicroPython Clock Task with RTC and NTP sync

      Just new to MicroPhyton, I just collected some code pieces in the web to get a "Clock" background task coded with RTC and NTP Sync by just some code lines.
      BTW. No flickering on the display etc.

      Please feel free to comment; need to learn ;-)

      # RTC Clock with NTP Sync for M5STACK
      # References:
      # https://forum.micropython.org/viewtopic.php?t=4329
      # Lobo Version to init RTC and timezone
      # https://forum.micropython.org/viewtopic.php?f=18&t=3553&p=21616&hilit=timezone#p21616
      from m5stack import machine
      from m5stack import lcd
      from time import strftime
      import utime
      import _thread
      
      # move to lowest line on M5STACK display
      lcd.setCursor(0, 227)
      lcd.setColor(lcd.WHITE)
      lcd.print("RTC Clock 1")
      
      # initiate rtc
      rtc = machine.RTC()
      print("Synchronize time from NTP server with TZ=Germany ...")
      rtc.ntp_sync(server="hr.pool.ntp.org", tz="CET-1CEST,M3.5.0,M10.5.0/3")
      
      def watch():
          while True:
              # start position for Date
              if not rtc.synced():                                                            # set color to sync status    
                  lcd.setColor(lcd.RED)
              else: 
                  lcd.setColor(lcd.GREEN)
      #       lcd.setCursor(92, 227)                                                          # uncomment if you need date on display
      #       lcd.print("Date {}".format(utime.strftime("%Y-%m-%d", utime.localtime())))      # uncomment if needed
              # start position for time only
              lcd.setCursor(213, 227)                                                         # uncomment if date active (see upper lines)
              lcd.print(" Time {}".format(utime.strftime('%H:%M:%S', utime.localtime())))
              utime.sleep(1)
      
      _thread.start_new_thread ("clock",watch, ())
      posted in PROJECTS
      M
      M5MPy
    • RE: Is M5Cloud down?

      @calin
      ok.

      Good point, I came from ATMega and ARM Arduino with "Standard" Arduino knowledge and was totally surprised that M5STACK MicroPython is running FreeRTOS.

      I will also review your links.

      Just new to MicroPhyton, I just collected some code pieces in the web to get a "Clock" background task coded with RTC and NTP Sync by just some code lines.
      BTW. No flickering on the display etc.

      posted in FAQS
      M
      M5MPy
    • RE: Is M5Cloud down?

      @jimit
      @daslolo

      MicroPython VS Arduino is no comparison of equals

      MPY is running FreeRTOS as uOS and so you have total different opportunities.
      Best of these for my IoT Application will be Over the Air updating with low amount of traffic.
      As only packages of text (code) will be sent; the traffic is low and update faster than Arduino USB connection (even without compiling).

      So I look forward for an adventure switching from Arduino to MicroPython with M5STACK,

      If you ever considered running multiple thread or tasks - for sure give it a try.
      If you just want to learn something new, the same. ;-)

      Cheers

      posted in FAQS
      M
      M5MPy
    • RE: Is M5Cloud down?

      Back online and running again. Thx

      posted in FAQS
      M
      M5MPy
    • RE: Is M5Cloud down?

      @jimit
      Thanks for the update.
      Also changed down to .38 upfront posting, but no change, the same as you mentioned.
      So used FTP and REPL on .39 since.
      Also hope they get M5Cloud working again soon, as I changed to MicroPython just recently and really enjoy it. ;-)

      posted in FAQS
      M
      M5MPy
    • RE: Is M5Cloud down?

      TTY snip for explanation :

      MicroPython ESP32_LoBo_v3.2.11 - 2018-04-16 on M5Stack with ESP32
      Type "help()" for more information.
      <>> [M5-30xxxyyyyyyy] M5Cloud connected.
      [M5Cloud] Uploading:/flash/config.json .
      [M5Cloud] Uploading:/flash/main.py .
      [M5Cloud] Uploading:/flash/boot.py .> M5 is connecting now ..

      and IDE freezes

      posted in FAQS
      M
      M5MPy