SpinKix

Untitled

Feb 15th, 2016
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.03 KB | None | 0 0
  1. #include "FastLED.h"
  2.  
  3. #define NUM_LEDS_PER_STRIP 80
  4. #define NUM_STRIPS 4;
  5.  
  6. CRGB leds[NUM_LEDS_PER_STRIP];
  7. CLEDController *controllers[NUM_STRIPS];
  8. uint8_t gBrightness = 128;
  9.  
  10. void setup() {
  11.   controllers[0] = &FastLED.addLeds<WS2812,1>(leds, NUM_LEDS_PER_STRIP);
  12.   controllers[1] = &FastLED.addLeds<WS2812,2>(leds, NUM_LEDS_PER_STRIP);
  13.   controllers[2] = &FastLED.addLeds<WS2812,10>(leds, NUM_LEDS_PER_STRIP);
  14.   controllers[3] = &FastLED.addLeds<WS2812,11>(leds, NUM_LEDS_PER_STRIP);
  15. }
  16.  
  17. void loop() {
  18.   // draw led data for the first strand into leds
  19.   fill_solid(leds, CRGB::Red);
  20.   controllers[0]->showLeds(gBrightness);
  21.  
  22.   // draw led data for the second strand into leds
  23.   fill_solid(leds, CRGB::Greem);
  24.   controllers[1]->showLeds(gBrightness);
  25.  
  26.   // draw led data for the third strand into leds
  27.   fill_solid(leds, CRGB::Blue);
  28.   controllers[2]->showLeds(gBrightness);
  29.  
  30.   // draw led data for the first strand into leds
  31.   fill_solid(leds, CRGB::White);
  32.   controllers[3]->showLeds(gBrightness);
  33. }
  34.  
  35.  
  36. ------------------------- ERROR MESSAGES --------------------------------------------------
  37.  
  38. Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Nano, ATmega328"
  39.  
  40. Using library FastLED in folder: D:\Arduino_Sketches\libraries\FastLED-master
  41.  
  42.  
  43.  
  44. D:\ARDUINO\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -ID:\ARDUINO\hardware\arduino\avr\cores\arduino -ID:\ARDUINO\hardware\arduino\avr\variants\eightanaloginputs -ID:\Arduino_Sketches\libraries\FastLED-master C:\Users\X\AppData\Local\Temp\build7107826087221206733.tmp\sketch_feb14a.cpp -o C:\Users\X\AppData\Local\Temp\build7107826087221206733.tmp\sketch_feb14a.cpp.o
  45.  
  46. sketch_feb14a.ino:4:21: error: expected ']' before ';' token
  47. sketch_feb14a.ino:7:29: note: in expansion of macro 'NUM_STRIPS'
  48. sketch_feb14a.ino:7:39: error: expected unqualified-id before ']' token
  49. sketch_feb14a.ino: In function 'void setup()':
  50. sketch_feb14a.ino:11:3: error: 'controllers' was not declared in this scope
  51. sketch_feb14a.ino: In function 'void loop()':
  52. sketch_feb14a.ino:19:29: error: no matching function for call to 'fill_solid(CRGB [80], CRGB::HTMLColorCode)'
  53. sketch_feb14a.ino:19:29: note: candidates are:
  54. In file included from D:\Arduino_Sketches\libraries\FastLED-master/FastLED.h:50:0,
  55.                  from sketch_feb14a.ino:1:
  56. D:\Arduino_Sketches\libraries\FastLED-master/colorutils.h:18:6: note: void fill_solid(CRGB*, int, const CRGB&)
  57.  void fill_solid( struct CRGB * leds, int numToFill,
  58.       ^
  59. D:\Arduino_Sketches\libraries\FastLED-master/colorutils.h:18:6: note:   candidate expects 3 arguments, 2 provided
  60. D:\Arduino_Sketches\libraries\FastLED-master/colorutils.h:23:6: note: void fill_solid(CHSV*, int, const CHSV&)
  61.  void fill_solid( struct CHSV* targetArray, int numToFill,
  62.       ^
  63. D:\Arduino_Sketches\libraries\FastLED-master/colorutils.h:23:6: note:   candidate expects 3 arguments, 2 provided
  64. sketch_feb14a.ino:20:3: error: 'controllers' was not declared in this scope
  65. sketch_feb14a.ino:23:20: error: 'Greem' is not a member of 'CRGB'
  66. sketch_feb14a.ino:27:30: error: no matching function for call to 'fill_solid(CRGB [80], CRGB::HTMLColorCode)'
  67. sketch_feb14a.ino:27:30: note: candidates are:
  68. In file included from D:\Arduino_Sketches\libraries\FastLED-master/FastLED.h:50:0,
  69.                  from sketch_feb14a.ino:1:
  70. D:\Arduino_Sketches\libraries\FastLED-master/colorutils.h:18:6: note: void fill_solid(CRGB*, int, const CRGB&)
  71.  void fill_solid( struct CRGB * leds, int numToFill,
  72.       ^
  73. D:\Arduino_Sketches\libraries\FastLED-master/colorutils.h:18:6: note:   candidate expects 3 arguments, 2 provided
  74. D:\Arduino_Sketches\libraries\FastLED-master/colorutils.h:23:6: note: void fill_solid(CHSV*, int, const CHSV&)
  75.  void fill_solid( struct CHSV* targetArray, int numToFill,
  76.       ^
  77. D:\Arduino_Sketches\libraries\FastLED-master/colorutils.h:23:6: note:   candidate expects 3 arguments, 2 provided
  78. sketch_feb14a.ino:31:31: error: no matching function for call to 'fill_solid(CRGB [80], CRGB::HTMLColorCode)'
  79. sketch_feb14a.ino:31:31: note: candidates are:
  80. In file included from D:\Arduino_Sketches\libraries\FastLED-master/FastLED.h:50:0,
  81.                  from sketch_feb14a.ino:1:
  82. D:\Arduino_Sketches\libraries\FastLED-master/colorutils.h:18:6: note: void fill_solid(CRGB*, int, const CRGB&)
  83.  void fill_solid( struct CRGB * leds, int numToFill,
  84.       ^
  85. D:\Arduino_Sketches\libraries\FastLED-master/colorutils.h:18:6: note:   candidate expects 3 arguments, 2 provided
  86. D:\Arduino_Sketches\libraries\FastLED-master/colorutils.h:23:6: note: void fill_solid(CHSV*, int, const CHSV&)
  87.  void fill_solid( struct CHSV* targetArray, int numToFill,
  88.       ^
  89. D:\Arduino_Sketches\libraries\FastLED-master/colorutils.h:23:6: note:   candidate expects 3 arguments, 2 provided
  90. Multiple libraries were found for "FastLED.h"
  91.  
  92.  Used: D:\Arduino_Sketches\libraries\FastLED-master
  93.  
  94.  Not used: D:\ARDUINO\libraries\FastLED-master
  95.  
  96. expected ']' before ';' token
Advertisement
Add Comment
Please, Sign In to add comment