我想做一款WiFi时钟,网上找了个教程,用ds3231、esp8266、ws2812b灯带模仿数码管的时钟,下载了楼主给的代码以后运行出错,错误信息如下:
Arduino:1.8.13 (Windows 7), 开发板:"Olimex MOD-WIFI-ESP8266(-DEV), 80 MHz, Flash, Disabled, 2M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
警告: DS3232RTC 库要求运行在 avr 架构(),可能与你现在运行在 esp8266 架构上的开发板()不兼容。
In file included from C:\Users\Administrator\Desktop\S7ripClock_BE_v6-pre\S7ripClock_BE_v6-pre.ino:24:0:
C:\Users\Administrator\Documents\Arduino\libraries\FastLED\src/FastLED.h:14:21: note: #pragma message: FastLED version 3.004.000
# pragma message "FastLED version 3.004.000"
^
In file included from C:\Users\Administrator\Documents\Arduino\libraries\FastLED\src/FastLED.h:65:0,
from C:\Users\Administrator\Desktop\S7ripClock_BE_v6-pre\S7ripClock_BE_v6-pre.ino:24:
C:\Users\Administrator\Documents\Arduino\libraries\FastLED\src/fastspi.h:135:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output
# pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"
^
C:\Users\Administrator\Desktop\S7ripClock_BE_v6-pre\S7ripClock_BE_v6-pre.ino: In function 'void setup()':
S7ripClock_BE_v6-pre:192:21: error: 'RTC' was not declared in this scope
setSyncProvider(RTC.get);
^
C:\Users\Administrator\Desktop\S7ripClock_BE_v6-pre\S7ripClock_BE_v6-pre.ino: In function 'void setupClock()':
S7ripClock_BE_v6-pre:537:5: error: 'RTC' was not declared in this scope
RTC.write(setupTime); // write setupTime to RTC
^
In file included from C:\Users\Administrator\Documents\Arduino\libraries\FastLED\src/FastLED.h:48:0,
from C:\Users\Administrator\Desktop\S7ripClock_BE_v6-pre\S7ripClock_BE_v6-pre.ino:24:
C:\Users\Administrator\Documents\Arduino\libraries\FastLED\src/fastpin.h: In instantiation of 'class FastPin<6u>':
C:\Users\Administrator\Documents\Arduino\libraries\FastLED\src/platforms/esp/8266/clockless_esp8266.h:21:49: required from 'class ClocklessController<6, 20, 50, 30, (EOrder)66u, 0, false, 50>'
C:\Users\Administrator\Documents\Arduino\libraries\FastLED\src/chipsets.h:578:7: required from 'class WS2812Controller800Khz<6u, (EOrder)66u>'
C:\Users\Administrator\Documents\Arduino\libraries\FastLED\src/FastLED.h:105:52: required from 'class WS2812B<6u, (EOrder)66u>'
C:\Users\Administrator\Documents\Arduino\libraries\FastLED\src/FastLED.h:302:39: required from 'static CLEDController& CFastLED::addLeds(CRGB*, int, int) [with CHIPSET = WS2812B; unsigned char DATA_PIN = 6u; EOrder RGB_ORDER = (EOrder)66u]'
C:\Users\Administrator\Desktop\S7ripClock_BE_v6-pre\S7ripClock_BE_v6-pre.ino:151:57: required from here
C:\Users\Administrator\Documents\Arduino\libraries\FastLED\src/fastpin.h:210:2: error: static assertion failed: Invalid pin specified
static_assert(validpin(), "Invalid pin specified");
^
exit status 1
'RTC' was not declared in this scope
在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。
本人是个小白,只会烧录不会写,所以出现这个错误我也不知道为啥,恳请各位大神帮忙,非常感谢!
|