arduino nano v3.3 通過藍牙發送到 PC
本帖最后由 killerlay 于 2013-3-8 23:59 编辑http://item.taobao.com/item.htm?id=4925458343&ali_trackid=2:mm_27963266_0_0:1358909124_4k4_1128082758
--------------taobao-SD卡读写模块单片机 SD SPI接口 SD卡插座 SD卡读写模块
http://itemtaobao.com/item.htm?spm=a230r.1.10.121.GLOlNo&id=19701244981
-----Nano-v3.0
http://tradearchive.taobao.com/trade/detail/tradeSnap.htm?spm=a1z09.2.9.42.9oE9we&tradeID=131334415469207
---- ---blue tooth model
目標: 首先通過arduino -Nano 讀取 SD-CARD 的資料 ,之後讓Bluetooth 藍牙 傳到電腦上?
电路图已经有啦,只差完美的编程!编程一直都是我的死穴
新人入门还望大家多多幫忙,指点,給點意見!
感谢 使用USB读卡器! zintiger 发表于 2013-3-9 09:26 static/image/common/back.gif
使用USB读卡器!
我就是不希望用那個,不可能每次都取下卡,然後插到USB 讀卡器吧,所以就想透過藍牙傳輸數據到PC.
小弟想問一個問題,這個可以同時發生的嗎,【一邊讀一邊傳數據】?? 搞定咯:http://www.youtube.com/watch?v=lw49GbDPLXg 楼主,请教下我用是APM2.5 mega2560的板子读取跟你一样的SD卡,但接线,写代码发现没反应!!
引脚接线: SD卡 APM2.5板
MISO---------> MISO(50)
MOSI----------> MOSI(51)
SCK ----------->SCK(52)
CS ----------> PB6(12) //这个是随便找个outpin接口用的
SS(53) //文档上说不用要设为输出
代码:
#include <SD.h>
#include <SPI.h>
// On the Ethernet Shield, CS is pin 4. Note that even if it's not
// used as the CS pin, the hardware CS pin (10 on most Arduino boards,
// 53 on the Mega) must be left as an output or the SD library
// functions will not work.// const int chipSelect =4 ;
const int chipSelect = 12;
void setup()
{
Serial.begin(9600);
Serial.print("Initializing SD card...\n");
// make sure that the default chip select pin is set to
// output, even if you don't use it:
//pinMode(10,out)
pinMode(53, OUTPUT);
// see if the card is present and can be initialized:
if (!SD.begin(chipSelect)) {
Serial.println("Card failed, or not present");
// don't do anything more:
return;
}
Serial.println("card initialized.");
}
void loop()
{
....
}
错误是在打印“Card failed, or not present”这个信息,就没了!!求帮忙啦,先谢过!!!! Mrrr_lee 发表于 2013-4-3 18:13 static/image/common/back.gif
楼主,请教下我用是APM2.5 mega2560的板子读取跟你一样的SD卡,但接线,写代码发现没反应!!
引脚接线:...
const int chipSelect = 53;
void setup()
{
Serial.begin(9600);
Serial.print("Initializing SD card...\n");
// make sure that the default chip select pin is set to
// output, even if you don't use it:
//pinMode(10,out)
pinMode(53, OUTPUT);
// see if the card is present and can be initialized:
if (!SD.begin(53)) {
Serial.println("Card failed, or not present");
// don't do anything more:
return;
}
Serial.println("card initialized.");
}
void loop()
{
....
}
killerlay 发表于 2013-4-3 22:23 static/image/common/back.gif
const int chipSelect = 53;
void setup()
{
按你的代码运行还是出现Card failed, or not present,错误!难道把SD卡的CS引脚接到APM板子的pin53,这个也是过了,也没用!!还是说SD卡的CS引脚要怎样接啊!! 本帖最后由 killerlay 于 2013-4-10 12:24 编辑
Mrrr_lee 发表于 2013-4-6 14:05 static/image/common/back.gif
按你的代码运行还是出现Card failed, or not present,错误!难道把SD卡的CS引脚接到APM板子的pin53,这个 ...
名字對接就對啦,不需要做什麼處理, 我用過這個code是沒問題的,可能你的電路有問題?確認一下:
SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS).
或者還有你的電壓問題,介意給個圖片我看一下嗎 killerlay 发表于 2013-4-10 11:22 static/image/common/back.gif
名字對接就對啦,不需要做什麼處理, 我用過這個code是沒問題的,可能你的電路有問題?確認一下:
S ...
麻烦帮我看看问题!!!
引脚接线: SD卡 APM2.5板
MISO---------> MISO(50)
MOSI----------> MOSI(51)
SCK ----------->SCK(52)
CS ----------> PB6(12) //这个是随便找个outpin接口用的
SS(53) //文档上说不用要设为输出 楼主你好,能透露一下你是怎么实现一边保存数据,一边蓝牙发送的吗?我也想做这个,但是不会。谢谢啦。
9 3 6 1 0 5 0 1 (麻花疼)9
页:
[1]