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

    RGB Neopixel Stripe

    Lessons and Guides
    neopixel
    3
    3
    975
    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.
    • T
      taunushexe
      last edited by taunushexe

      in UIFlow 2 i get for RGB
      rgb_0 = RGBUnit((1, 2), 60)
      Why 2 Pins? normaly Neopixel uses 1 Output Pin
      if i switch to custom setup , UIFlow will also ask for Input and Output
      How can i generate
      rgb_0 = RGBUnit(2, 60) (output on port B; G2 ) no Input Pin
      I need G1 Port for a other Input
      Or can i use the normal Micropython Neopixel port?
      n = neopixel.NeoPixel(pin, 60)

      1 Reply Last reply Reply Quote 0
      • ajb2k3A
        ajb2k3
        last edited by

        It because the RGB is a subclass of unit which is the top level class for controlling all units. Just set both numbers to the same pin

        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 0
        • felmueF
          felmue
          last edited by

          Hello @taunushexe

          as @ajb2k3 mentioned only one GPIO (the second one) is used for the RGB unit. So the other GPIO can still be used as input. I created an example which uses GPIO1 as input to control the color of the three RGB LEDs in the RGB unit.

          See UIFlow2 Project Zone : M5Dial_RGBUnit_GPIO1_as_input_UIFlow2.0.4

          Thanks
          Felix

          GPIO translation table M5Stack / M5Core2
          Information about various M5Stack products.
          Code examples

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