楼主: chenhanzhong
|
[项目] 基于3D打印+Arduino的LED时钟 |
chenhanzhong 发表于 2019-7-23 00:08 我想详细了解一下,怎么联系您 |
chenhanzhong 发表于 2019-7-23 00:08 很漂亮,自己动手搞一个。 |
LED_clock:15:8: error: no matching function for call to 'DS3231::DS3231()' DS3231 Clock; //定义时钟对象 ^~~~~ In file included from C:\Users\S7\AppData\Local\Temp\arduino_modified_sketch_447217\LED_clock.ino:2:0: d:\Users\S7\Documents\Arduino\libraries\DS3231/DS3231.h:80:3: note: candidate: DS3231::DS3231(uint8_t, uint8_t) DS3231(uint8_t data_pin, uint8_t sclk_pin); ^~~~~~ d:\Users\S7\Documents\Arduino\libraries\DS3231/DS3231.h:80:3: note: candidate expects 2 arguments, 0 provided d:\Users\S7\Documents\Arduino\libraries\DS3231/DS3231.h:77:7: note: candidate: constexpr DS3231::DS3231(const DS3231&) class DS3231 ^~~~~~ d:\Users\S7\Documents\Arduino\libraries\DS3231/DS3231.h:77:7: note: candidate expects 1 argument, 0 provided d:\Users\S7\Documents\Arduino\libraries\DS3231/DS3231.h:77:7: note: candidate: constexpr DS3231::DS3231(DS3231&&) d:\Users\S7\Documents\Arduino\libraries\DS3231/DS3231.h:77:7: note: candidate expects 1 argument, 0 provided C:\Users\S7\AppData\Local\Temp\arduino_modified_sketch_447217\LED_clock.ino: In function 'void ReadDS3231()': LED_clock:108:20: error: 'class DS3231' has no member named 'getSecond' second_now=Clock.getSecond(); ^~~~~~~~~ LED_clock:109:20: error: 'class DS3231' has no member named 'getMinute'; did you mean 'getTime'? minute_now=Clock.getMinute(); ^~~~~~~~~ getTime LED_clock:110:18: error: 'class DS3231' has no member named 'getHour' hour_now=Clock.getHour(h12, PM); ^~~~~~~ LED_clock:111:18: error: 'class DS3231' has no member named 'getDate'; did you mean 'setDate'? date_now=Clock.getDate(); ^~~~~~~ setDate LED_clock:112:19: error: 'class DS3231' has no member named 'getMonth'; did you mean 'getMonthStr'? month_now=Clock.getMonth(Century); ^~~~~~~~ getMonthStr LED_clock:113:18: error: 'class DS3231' has no member named 'getYear'; did you mean 'getTemp'? year_now=Clock.getYear(); ^~~~~~~ getTemp LED_clock:116:20: error: 'class DS3231' has no member named 'getDoW'; did you mean 'setDOW'? week_now = Clock.getDoW();//获取星期 ^~~~~~ setDOW exit status 1 no matching function for call to 'DS3231::DS3231()' 请问这个是为什么? |
ebeeb 发表于 2020-3-17 21:23 可能是时钟库没导入成功。你用的是ds3231模块吗? |
楼主你好,看了你的这个作品自己也想做一个,我没有接触过arduio,打开你的程序编译出现fatal error: OneWire.h: No such file or directory #include <OneWire.h> 这个错误是怎么了,我从GITHUB上把OneWire这个库下载了在ds18b20库和ds3231库文件文件夹下分别放一份,又报 No such file or directory #include "util/OneWire_direct_regtype.h" ,楼主帮忙看看,是哪里的问题,谢谢你了 |
dujice001 发表于 2020-3-23 18:06 可能是IDE的版本问题,也有可能是库的问题。先换最新版本的arduino ide试试,库文件也可以在软件里面导入的。 |
© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed