🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    [SOLVED] Hi All I'm suffering a stupid moment.

    Micropython
    1
    1
    1.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ajb2k3A
      ajb2k3
      last edited by ajb2k3

      Why is it that this code work on a RPI and An M5Stamp C3 but not and ESp32 Pico D4 found in the stick family running MP1.19.1 (mainstream)?

      # Imports
      import time
      from machine import Pin
      from neopixel import NeoPixel
      
      # Define the strip pin number (28) and number of LEDs (15)
      strip = NeoPixel(Pin(28), 15)
      
      # Variable for the fade speed
      delay = 0.005
      
      while True: # Run forever
          
          # Iterate from 1 to 255 in steps of 1
          for i in range(1,255,1):
              
              # Fill the strip using the iterated R value
              strip.fill((i,0,0))
              
              # Write the data to the LED strip
              strip.write()
              
              # Delay
              time.sleep(delay)
              
          # iterate from 255 to 1 in steps of -1
          for i in range(255,1,-1):
              
              # Fill the strip using the iterated R value
              strip.fill((i,0,0))
              
              # Write the data to the LED strip
              strip.write()
              
              # Delay
              time.sleep(delay)
      
      

      Ok solved it. The issue was due to power supply issues.

      UIFlow, so easy an adult can learn it!
      If I don't know it, be patient!
      I've ether not learned it or am too drunk to remember it!
      Author of the WIP UIFlow Handbook!
      M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

      1 Reply Last reply Reply Quote 1
      • First post
        Last post