66mm WS2812B 24 RGB LED Ring (HCMODU0128)

LCD, TFT, OLED, LED modules
Post Reply
admin
Site Admin
Posts: 865
Joined: Sun Aug 05, 2012 4:02 pm

66mm WS2812B 24 RGB LED Ring (HCMODU0128)

Post by admin » Mon Feb 26, 2018 3:45 pm

Image





This 66mm module contains a strip of 24 individually controllable RGB LEDs arranged in a circular serial configuration. Each LED has separately controllable red, green, and blue, elements which can be individually set to one of 256 different intensity settings, allowing over 16 million colour variations. The module also has power and data connections at both ends of the chain so that multiple modules can be connected together whilst still only requiring one digital pin to drive them.

What's more, to make controlling these LED's from an Arduino as simple as possible we have written our own exclusive library what will handle all the complicated bits. See bottom of this post or our blog for more information on this library and requirements.

Image Image



Image

Model number: HCMODU0128
Supply voltage: 4.5 to 5.5V (5V recommended)
LEDs per ring: 16
Max module current: 860mA (approx)
Module diameter: 66mm




Image




  1. /* FILE:    HCWS2812_Random_Example
  2.    DATE:    22/02/24
  3.    VERSION: 1.0
  4.    AUTHOR:  Andrew Davies
  5.  
  6. 11/03/15 version 0.1: Original version
  7. 22/02/24 version 1.0: DOUT pin defaults to pin 2 (this can be changed in HCWS2812.h)
  8.  
  9. This is an example of how to use the HCMAX7219 library to control one or more
  10. RGB LEDS. The example will set each LED to a random colour.
  11.  
  12. To use this example connect one or more LEDs in series (Dout --> Din) and connect
  13. the first LED's Din pin to digital pin 2 of your Arduino.
  14.  
  15. By default the library is set to control 200 LEDs. You can change this by editing the
  16. following line in the MCMAX7219.h header file:
  17.  
  18. #define NUMBEROFLEDS 200 <--- Change this number to match the number of LEDS connected
  19.  
  20. You can download the library from the software section of our support forum here:
  21. http://forum.hobbycomponents.com/viewforum.php?f=58
  22.  
  23. Or from Github here:
  24. https://github.com/HobbyComponents/HCWS2812
  25.  
  26. You may copy, alter and reuse this code in any way you like, but please leave
  27. reference to HobbyComponents.com in your comments if you redistribute this code.
  28. This software may not be used directly for the purpose of selling products that
  29. directly compete with Hobby Components Ltd's own range of products.
  30.  
  31. THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER
  32. EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
  33. MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
  34. HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,
  35. INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY
  36. REASON WHATSOEVER.
  37. */
  38.  
  39. /* Include the HCWS2812 library */
  40. #include "HCWS2812.h"
  41.  
  42. /* Create an instance of the library */
  43. HCWS2812 HCWS2812;
  44.  
  45. void setup()
  46. {
  47.   /* Set the R,G,B background colours to zero */
  48.   HCWS2812.SetBG(0, 0, 0);
  49.   /* Clear the output buffer */
  50.   HCWS2812.ClearBuffer();
  51. }
  52.  
  53.  
  54. void loop()
  55. {
  56.   int index;
  57.  
  58.   /* Fill the output buffer with random colours */
  59.   for(index = 0; index < NUMBEROFLEDS; index++)
  60.   {  
  61.     RGBBuffer[RED][index] = random(0,255);
  62.     RGBBuffer[GREEN][index] = random(0,255);
  63.     RGBBuffer[BLUE][index] = random(0,255);
  64.   }
  65.  
  66.   /* Send the output buffer to the LEDs */
  67.   HCWS2812.Refresh();
  68.  
  69.   /* Wait a moment before doing it again */
  70.   delay(100);
  71. }




Image

The library files can be downloaded from github here:

https://github.com/HobbyComponents/HCWS2812

Or directly from this forum:

http://forum.hobbycomponents.com/viewto ... =58&t=1799


Datasheet:
WS2812.pdf




Disclaimer: Libraries, example code, and diagrams are provided as an additional free service by Hobby Components and are not sold as part of this product. We do not provide any guarantees or warranties as to their accuracy or fitness for purpose.

Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “Display”