Lighting the RGB LED

From Banana Pi Wiki
Revision as of 00:33, 10 September 2018 by Hulkwang (talk | contribs) (Programe Code)
Jump to: navigation, search

How to lighting the RGB LED

Install Library

  1. Install library from github:
  • Librarys:[NeoPixel_Bus] from Makuna
  • Download libraries and put it in the libraries folder in the installation directory of the Arduino IDE
Error creating thumbnail: Unable to save thumbnail to destination


  1. Install Library by Manage Libraries:
Error creating thumbnail: Unable to save thumbnail to destination
Error creating thumbnail: Unable to save thumbnail to destination

Programe Code

  • Open Arduino IDE

click 'file'->'Example'->'NeoPixel Bus'->'simple' to open the example

Error creating thumbnail: Unable to save thumbnail to destination


  • We need to change some code,Find the code below in the code
 #define PIN            6
 #define NUMPIXELS      16
  • change to
 #define PIN            4
 #define NUMPIXELS      25
 #define LED_POWER      2
  • Then add the following code to void setup()
  pinMode(LED_POWER, OUTPUT);
  digitalWrite(LED_POWER, HIGH);
  • Compile this program
Error creating thumbnail: Unable to save thumbnail to destination

And download it(Set the serial port and board)