Introduction: Arduino Neopixel LED Ring Ws2812 - Visuino Tutorial

About: Arduino fan!

In this tutorial we will learn how to control the Neopixel Led Ring Ws2812 using Arduino and Visuino to run the LED pixel around.

Watch a demonstration video.

Step 1: What You Will Need

Step 2: The Circuit

  1. Connect LED Ring pin [VCC] to Arduino pin [+5V]
  2. Connect LED Ring pin [GND] to Arduino pin [GND]
  3. Connect LED Ring pin [IN] or (DI) to Arduino digital pin [6]

Step 3: Start Visuino, and Select the Arduino UNO Board Type

To start programming the Arduino, you will need to have the Arduino IDE installed from here: https://www.arduino.cc/.

Please be aware that there are some critical bugs in Arduino IDE 1.6.6. Make sure that you install 1.6.7 or higher, otherwise this Instructable will not work! If you have not done follow the steps in this Instructable to setup the Arduino IDE to program Arduino UNO! The Visuino: https://www.visuino.eu also needs to be installed. Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2

Step 4: In Visuino Add Components

  1. Add "Clock Generator" component
  2. Add "Counter" component
  3. Add "Compare Integer Value" component
  4. Add "Random RGBW Color" component
  5. Add "NeoPixels" component

Step 5: In Visuino Set Components

  1. Select "ClockGenerator1" component and in the properties window set "Frequency" to 10
  2. Select "Counter1" component and in the properties window set "Max" to 12 or 16 (Depends on how many LED your LED ring is having)
  3. Select "Counter1" component and in the properties window set "Min" to 0
  4. Select "CompareValue1" component and set "Value" to 12 or 16 (Depends on how many LED your LED ring is having)
  5. Select "CompareValue1" component and set "Compare Type" to ctNotEqual
  6. Double click on the "NeoPixels1" and in the "PixelGroups" window drag "Color Pixel" to the left
  7. On the left side of the "PixelGroups" window then select "Color Pixel1" and in the properties window set "Count Pixels" to 12 or 16 (Depends on how many LED your LED ring is having)

Step 6: In Visuino Connect Components

  1. Connect "ClockGenerator1" component pin [Out] to "Counter1" component pin [In]
  2. Connect "Counter1" component pin [Out] to "CompareValue1" component pin [In]
  3. Connect "Counter1" component pin [Out] to "NeoPixels1" >Color Pixel1 component pin [Index]
  4. Connect "CompareValue1" component pin [Out] to "Counter1" component pin "Reset"
  5. Connect "CompareValue1" component pin [Out] to "RandomRGBWColor1" component pin "Clock"
  6. Connect "RandomRGBWColor1" component pin [Out] to "NeoPixels1" >Color Pixel1 component pin [Color]
  7. Connect "NeoPixels1" component pin [Out] to Arduino digital pin[6]

Step 7: Generate, Compile, and Upload the Arduino Code

In Visuino, Press F9 or click on the button shown on Picture 1 to generate the Arduino code, and open the Arduino IDE

In the Arduino IDE, click on the Upload button, to compile and upload the code (Picture 2)

Step 8: Play

If you power the Arduino UNO module, the LED ring will start to change its colors.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable, you can download it here and open it in Visuino: https://www.visuino.eu