我想弄一个RGB的灯带,在网上找到了代码,但是照着那里面输入之后说为开发板 Arduino Nano 编译时出错,下面是错误信息Arduino:1.8.9 (Windows 10), 开发板:"Arduino Nano, ATmega328P (Old Bootloader)"
In file included from C:\Users\WIN10\AppData\Local\Temp\arduino_modified_sketch_913316\sketch_apr15c.ino:9:0:
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.003
# pragma message "FastLED version 3.003.003"
^
In file included from C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/fastled_avr.h:6:0,
from C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms.h:39,
from C:\Users\WIN10\Documents\Arduino\libraries\FastLED/FastLED.h:52,
from C:\Users\WIN10\AppData\Local\Temp\arduino_modified_sketch_913316\sketch_apr15c.ino:9:
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h: In static member function 'static void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showRGBInternal(PixelController<RGB_ORDER>&)':
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before '__attribute__'
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:409:55: note: in expansion of macro 'FL_FALLTHROUGH'
case 4: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before '__attribute__'
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:410:55: note: in expansion of macro 'FL_FALLTHROUGH'
case 3: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before '__attribute__'
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:411:55: note: in expansion of macro 'FL_FALLTHROUGH'
case 2: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before '__attribute__'
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:425:55: note: in expansion of macro 'FL_FALLTHROUGH'
case 4: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before '__attribute__'
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:426:55: note: in expansion of macro 'FL_FALLTHROUGH'
case 3: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before '__attribute__'
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:427:55: note: in expansion of macro 'FL_FALLTHROUGH'
case 2: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before '__attribute__'
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:444:55: note: in expansion of macro 'FL_FALLTHROUGH'
case 4: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before '__attribute__'
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:445:55: note: in expansion of macro 'FL_FALLTHROUGH'
case 3: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before '__attribute__'
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
C:\Users\WIN10\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:446:55: note: in expansion of macro 'FL_FALLTHROUGH'
case 2: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
exit status 1
为开发板 Arduino Nano 编译时出错。
在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。
大佬们帮下忙吧 |