极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 11796|回复: 1

求助大神解决NRF24L01问题?

[复制链接]
发表于 2014-11-15 20:41:01 | 显示全部楼层 |阅读模式
问什么我下载的别人的代码,怎么也编译不成功呢?????

IDE显示:


In file included from D:\Arduino\hardware\arduino\cores\arduino/Arduino.h:213,
                 from nRF24l01_TX3.pde:7:
D:\Arduino\hardware\arduino\variants\mega/pins_arduino.h:36: error: expected unqualified-id before numeric constant
D:\Arduino\hardware\arduino\variants\mega/pins_arduino.h:37: error: expected unqualified-id before numeric constant
D:\Arduino\hardware\arduino\variants\mega/pins_arduino.h:38: error: expected unqualified-id before numeric constant






本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复

使用道具 举报

发表于 2015-1-27 10:35:42 | 显示全部楼层
,,根据底下的提示,寻找 到pins_arduino.h文件的 41行,你就知道了,那里定义了static const uint8_t MOSI = 11;
static const uint8_t MISO = 12;
static const uint8_t SCK  = 13;
你用的NRF24L01库重复定义了。所以就出问题了,我也是刚刚开始弄,搜到你的帖看楼下,结果没有人回复,好无奈。不过还是自己尝试 修改了 库定义。我将定义名字改成  MOSI_2401  MISO_2401 SCK_2401
回复 支持 反对

使用道具 举报

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

本版积分规则

Archiver|联系我们|极客工坊

GMT+8, 2026-6-17 23:27 , Processed in 0.037742 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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