element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Controlling multiple WS2812B via UNO
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 3 replies
  • Subscribers 393 subscribers
  • Views 1161 views
  • Users 0 members are here
  • frontpage
Related

Controlling multiple WS2812B via UNO

bassslapme
bassslapme over 8 years ago

So I have been asked to install a bunch of LED's into a friends fight stick as he knows nothing about them whilst I have a little experience with them. I have used WS2812B's as a backlight for my TV and used a HM-10 for it so i could make an app for it.

I wanted to reuse the app I made as it would mean cutting down the coding process, but I can't get my head around how I would control multiple sets of the strips. I would daisy chain each strip together via the DIN and DO, but when I put this in practice it just lights up the whole strip with whatever I set the first strip to. I believe maybe defining the individual strips would work ( # define LED_STRIP_A)

and then defining how many led are in that strips and applying the code for the different effects or just the RBG value for each pixel would work but I would like some pre-mental breakdown advice before I plunge into this and fail.

  • Sign in to reply
  • Cancel

Top Replies

  • mcb1
    mcb1 over 8 years ago +2
    Each LED in the strip is addressable. My understanding is that each WS2812 takes the data in, and subtracts one from the address and passes it out the Dout. For this example lets assume you have 4 lots…
Parents
  • 14rhb
    14rhb over 8 years ago

    I've not yet used WS2812 on the Arduino but have built quite a few circuits using the Microchip PIC range. So, although I'm not familiar with any of the WS2812 Arduino libraries this is wha I'd have done in the PIC C code.....

     

    When you daisychain the strips together, is your code not pushing out just enough data to light the first strip ? Perhaps then, when it wants to refresh that strip it pushes that data further on out through Dout and into Din - and so illuminates the second strip (as you are seeing) ?

     

    You could: Set up an array to hold the RGB data and ensure it is long enough to hold data for all the elements you require daisychained. To do something specific to the nth strip you would manipulate the array contents directly. Then at regular intervals (say 50ms)  - push the whole array out on a single Arduino pin to the daisychained WS2812.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • 14rhb
    14rhb over 8 years ago

    I've not yet used WS2812 on the Arduino but have built quite a few circuits using the Microchip PIC range. So, although I'm not familiar with any of the WS2812 Arduino libraries this is wha I'd have done in the PIC C code.....

     

    When you daisychain the strips together, is your code not pushing out just enough data to light the first strip ? Perhaps then, when it wants to refresh that strip it pushes that data further on out through Dout and into Din - and so illuminates the second strip (as you are seeing) ?

     

    You could: Set up an array to hold the RGB data and ensure it is long enough to hold data for all the elements you require daisychained. To do something specific to the nth strip you would manipulate the array contents directly. Then at regular intervals (say 50ms)  - push the whole array out on a single Arduino pin to the daisychained WS2812.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube