Guest User

Untitled

a guest
Feb 1st, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.82 KB | None | 0 0
  1. #include "FastLED.h"
  2. #define NUM_LEDS 32
  3.  
  4. //CRGB leds[NUM_LEDS];  // Not using this.  Use CRGBArray instead.
  5. CRGBArray<NUM_LEDS> leds;
  6.  
  7. CRGBSet partA(leds(0,5));
  8. CRGBSet partB(leds(26,31));
  9.  
  10. //---------------------------------------------------------------
  11. void setup() {
  12.   FastLED.addLeds<LPD8806, 11, 13, GRB>(leds, NUM_LEDS);
  13.   FastLED.setBrightness(50);
  14. }
  15.  
  16. //---------------------------------------------------------------
  17. void loop()
  18. {
  19.   fill_rainbow(leds, NUM_LEDS, millis()/15);
  20.   leds(partA) = CHSV(0,180,255);  // Not working.
  21.   leds(partB) = CHSV(82,255,255);  // Not working.
  22.   FastLED.show();
  23. }
  24.  
  25.  
  26.  
  27. /*********** ERROR MESSAGE:
  28.  
  29. In file included from CRGBSet_example.ino:1:0:
  30. C:\Users\marc\Google Drive\arduino\sketches\libraries\FastLED/FastLED.h:12:2: warning: #warning FastLED version 3.001.001 (Not really a warning, just telling you here.) [-Wcpp]
  31. #warning FastLED version 3.001.001  (Not really a warning, just telling you here.)
  32. ^
  33. CRGBSet_example.ino: In function 'void loop()':
  34. CRGBSet_example:20: error: no match for call to '(CRGBArray<32>) (CRGBSet&)'
  35. In file included from C:\Users\marc\Google Drive\arduino\sketches\libraries\FastLED/FastLED.h:51:0,
  36. from CRGBSet_example.ino:1:
  37. C:\Users\marc\Google Drive\arduino\sketches\libraries\FastLED/pixelset.h:294:7: note: candidate is:
  38. class CRGBArray : public CPixelView<CRGB> {
  39. ^
  40. In file included from C:\Users\marc\Google Drive\arduino\sketches\libraries\FastLED/FastLED.h:51:0,
  41. from CRGBSet_example.ino:1:
  42. C:\Users\marc\Google Drive\arduino\sketches\libraries\FastLED/pixelset.h:56:21: note: CPixelView<PIXEL_TYPE> CPixelView<PIXEL_TYPE>::operator()(int, int) [with PIXEL_TYPE = CRGB]
  43. inline CPixelView operator()(int start, int end) { return CPixelView(leds, start, end); }
  44. ^
  45. C:\Users\marc\Google Drive\arduino\sketches\libraries\FastLED/pixelset.h:56:21: note:   candidate expects 2 arguments, 1 provided
  46. CRGBSet_example:21: error: no match for call to '(CRGBArray<32>) (CRGBSet&)'
  47. In file included from C:\Users\marc\Google Drive\arduino\sketches\libraries\FastLED/FastLED.h:51:0,
  48. from CRGBSet_example.ino:1:
  49. C:\Users\marc\Google Drive\arduino\sketches\libraries\FastLED/pixelset.h:294:7: note: candidate is:
  50. class CRGBArray : public CPixelView<CRGB> {
  51. ^
  52. In file included from C:\Users\marc\Google Drive\arduino\sketches\libraries\FastLED/FastLED.h:51:0,
  53. from CRGBSet_example.ino:1:
  54. C:\Users\marc\Google Drive\arduino\sketches\libraries\FastLED/pixelset.h:56:21: note: CPixelView<PIXEL_TYPE> CPixelView<PIXEL_TYPE>::operator()(int, int) [with PIXEL_TYPE = CRGB]
  55. inline CPixelView operator()(int start, int end) { return CPixelView(leds, start, end); }
  56. ^
  57. C:\Users\marc\Google Drive\arduino\sketches\libraries\FastLED/pixelset.h:56:21: note:   candidate expects 2 arguments, 1 provided
  58. no match for call to '(CRGBArray<32>) (CRGBSet&)'
  59.  
  60.  
  61. ***********/
Advertisement
Add Comment
Please, Sign In to add comment