幕后煮屎者 发表于 2015-10-5 22:38:09

DS1302报错

我像这个帖子一样接法,接线没错,但在编译程序时Arduino IDE总是说编译错误,搞得我头都大了!我是按照这个教程弄的!http://www.geek-workshop.com/forum.php?mod=viewthread&tid=205&highlight=DS1302
以下是错误信息:
Arduino:1.6.5 (Windows XP), 板:"Arduino Nano, ATmega328"

构建选项已变更,全部重新构建

使用库 DS1302 在文件夹: D:\arduino-1.6.5-r5\Arduino\libraries\DS1302 (legacy)



D:\arduino-1.6.5-r5\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -ID:\arduino-1.6.5-r5\Arduino\hardware\arduino\avr\cores\arduino -ID:\arduino-1.6.5-r5\Arduino\hardware\arduino\avr\variants\eightanaloginputs -ID:\arduino-1.6.5-r5\Arduino\libraries\DS1302 C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build3424291655881570545.tmp\sketch_oct05a.cpp -o C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build3424291655881570545.tmp\sketch_oct05a.cpp.o

In file included from sketch_oct05a.ino:3:0:
D:\arduino-1.6.5-r5\Arduino\libraries\DS1302/DS1302.h:31:22: fatal error: WProgram.h: No such file or directory
#include "WProgram.h"
                      ^
compilation terminated.
编译有误。

Be1ieve 发表于 2015-10-6 00:13:39

重新載新版本的DS1302庫就好

Damn_intuition 发表于 2015-10-6 09:08:33

DS1302是太老了,下载一个1.1+的版本就好了。

fengz41 发表于 2015-10-8 19:27:06

编译错误报错肯定不是接线问题。我用mini pro 经常不接外围设备下载完了再插到做好板子上用……

可靠的中国小伙 发表于 2015-12-12 17:51:22

楼主,你的成功了吗?

幕后煮屎者 发表于 2015-12-12 23:07:24

可靠的中国小伙 发表于 2015-12-12 17:51 static/image/common/back.gif
楼主,你的成功了吗?

从此再也不玩DS1302了!准备入手DS1307

saibrad 发表于 2015-12-19 12:27:50

因為想做1個鬧鐘的關係 DS1302我之前玩過1次
WProgram.h這個庫的問題
這是舊版的IDE用的
新版的好像是用Arduino.h庫來整合
不過後看論壇里說DS3231的精準度較高
改玩DS3231

不過我也才剛玩arduion才2個月左右的超白新手而已

迷你强 发表于 2015-12-19 13:09:42

可以考虑PCF8563,方便好用
页: [1]
查看完整版本: DS1302报错