小白白求助帖,WiFi时钟代码问题-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 2269|回复: 2

小白白求助帖,WiFi时钟代码问题

[复制链接]
发表于 2021-5-30 18:16 | 显示全部楼层 |阅读模式
我想做一款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



在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。

本人是个小白,只会烧录不会写,所以出现这个错误我也不知道为啥,恳请各位大神帮忙,非常感谢!
FUWANU3KAWI8GCW.jpg
QQ浏览器截图20210530181540.png
发表于 2021-5-30 19:32 | 显示全部楼层
报错已经说明了,你使用的lib不兼容esp8266。解决办法就是找个能兼容的库。
该问题和blinker无关,帮你移到8266板块,并修改标题了
 楼主| 发表于 2021-5-30 20:02 | 显示全部楼层
奈何col 发表于 2021-5-30 19:32
报错已经说明了,你使用的lib不兼容esp8266。解决办法就是找个能兼容的库。
该问题和blinker无关,帮你移到 ...

非常感谢您的解答,但是好像以我这水平整不明白,准备放弃了,再次感谢
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-28 10:38 , Processed in 0.076597 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表