极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9959|回复: 4

虚拟串口类库编译不过,求教

[复制链接]
发表于 2013-10-6 14:41:27 | 显示全部楼层 |阅读模式
下载了几个虚拟串口的库,都编译不过,求教
报错内容:

D:\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::begin(long int)':
D:\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:399: error: 'PCICR' was not declared in this scope
D:\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:402: error: 'PCMSK2' was not declared in this scope
D:\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:402: error: 'PCMSK0' was not declared in this scope
D:\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:402: error: 'PCMSK1' was not declared in this scope
D:\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::end()':
D:\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:417: error: 'PCMSK2' was not declared in this scope
D:\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:417: error: 'PCMSK0' was not declared in this scope
D:\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:417: error: 'PCMSK1' was not declared in this scope

调用代码:
#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3);


void setup(){
  mySerial.begin(9600);
  mySerial.println("Start...");
}

void loop(){
}

回复

使用道具 举报

 楼主| 发表于 2013-10-7 15:36:39 | 显示全部楼层
自己顶一下,没人知道吗?
回复 支持 反对

使用道具 举报

发表于 2013-10-8 22:22:26 | 显示全部楼层
芯片选错了 "tools-board-atmega8"
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-10-8 23:53:35 | 显示全部楼层
yyy_zc 发表于 2013-10-8 22:22
芯片选错了 "tools-board-atmega8"

和选板子没关系啊,我用uno,也是一样报错!
回复 支持 反对

使用道具 举报

发表于 2013-11-17 19:28:41 | 显示全部楼层
本帖最后由 沧海笑1122 于 2013-11-17 21:47 编辑

检查一下IDE版本,我用的0023以及1.05,编译你的代码没问题。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 需要先绑定手机号

Archiver|联系我们|极客工坊

GMT+8, 2024-4-20 19:07 , Processed in 0.038245 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2021, Tencent Cloud.

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