作者: zonebaby 時間: 2009-8-18 15:18 標題: 新手試試 --- Arduino Bluetooth擴展板套裝
係網上搵有關E塊板既兩條link,
http://item.taobao.com/auction/i ... 725791bfb2ec6ba.htm
http://www.roboticfan.com/blog/u ... 2009512213936.shtml
睇完發現都唔係好複雜,都試下搞番過無線既藍牙出字。
兩塊藍牙板仔一樣樣都好唔知點分,只係文中提到:
閃得慢係發送主機,閃得快係接收副機,都係要試...
試完就知道板上加左黒點就係發送主機,不過唔知係唔係咁.....
Bluetooth Set
https://www.hkepc.com/forum/attachment.php?aid=929121&k=6daaeab301f737fb411e02a6b410de4f&t=1781447022&sid=3NrJfjN6F2

作者: zonebaby 時間: 2009-8-18 15:22
要用E兩塊板最方便係加塊MAX485擴展板,唔係用粒485,不過D接口啱用。
所以塊MAX485擴展板上果3粒jumper都要改位置。
另外原因一樣,因為使用Bluetooth擴展板套裝接口都係會佔用Pin0同1影嚮upload,
所以最好都係先插好Jumpers同埋塊Bluetooth擴展板係塊MAX485擴展板上面,
輪出果塊就插埋D LCD接口....
等upload完至插上去個Arduino道,避免upload失敗。
Bluetooth MAX485
https://www.hkepc.com/forum/attachment.php?aid=929123&k=9657cf6c0531a7de22b3885f4ff9d52e&t=1781447022&sid=3NrJfjN6F2

作者: zonebaby 時間: 2009-8-18 15:22
測試方式係由一部Arduino連續不停地發送'Hello! Arduino ','BlueTooth Testing '。
信息一方面經Bluetooth存送到另一部Arduino,
另一方面亦可以係PC用hyperterminal經USB進行鑑察。
另一部Arduino會負責接收。收到就會直接出LCD顕示出來,唔再用串行輸出。
兩部Arduino可以分開唔需要連接在一起。
Bluetooth MAX485 Arduino
https://www.hkepc.com/forum/attachment.php?aid=929124&k=a1dcffa5d625b52852eb9e81f5ec2b65&t=1781447022&sid=3NrJfjN6F2

作者: zonebaby 時間: 2009-8-18 15:22
發送code
- void setup()
- {
- Serial.begin(115200);
- }
- void loop()
- {
- Serial.print("Hello! Arduino ");
- delay(200);
- Serial.print("BlueTooth Testing ");
- delay(500);
- }
作者: zonebaby 時間: 2009-8-18 15:22
接收code
- // include the library code:
- #include <LiquidCrystal.h>
- // initialize the library with the numbers of the interface pins
- LiquidCrystal lcd(13, 11, 7, 6, 5, 4);
- void setup()
- {
- // set up the LCD's number of rows and columns:
- lcd.begin(16, 2);
- // Print a welcome message to the LCD.
- lcd.print("hello, world!");
- // Print a message to the LCD.
- // set the cursor to column 0, line 1
- // (note: line 1 is the second row, since counting begins with 0):
- lcd.setCursor(0, 1);
- Serial.begin(115200);
- }
- void loop()
- {
- char val;
- val = Serial.read();
-
- if(val!=-1)
- {
- // serial send received char:
- lcd.print(val);
- }
- }
作者: zonebaby 時間: 2009-8-18 15:22
E兩個Code都係放在examples\BlueToothV2入面....
Bluetooth Location
Compile同upload成功後,分別插番兩塊MAX485擴展板,再插番兩個USB就可以試機。
不過要小心唔好掉轉兩塊板。
插左電等一陣,BlueTooth上面既LED就會變成常亮代表完成配對可以開始通訊。
並開始由一部Arduino連續不停地發送Hello! Arduino BlueTooth Testing...到另一部Arduino。
另一部Arduino收到後就會係LCD顯示出來。
Bluetooth Success
同時亦可以睇用個hyperterminal睇下另一部Arduino既發送情況。
Bluetooth Terminal
Bluetooth擴展板試機成功.......
https://www.hkepc.com/forum/attachment.php?aid=929125&k=63a519680fb2b582ab6877dc03bbe23d&t=1781447022&sid=3NrJfjN6F2

https://www.hkepc.com/forum/attachment.php?aid=929126&k=ae3b28d71f6206ee800cf7a8804c490a&t=1781447022&sid=3NrJfjN6F2

https://www.hkepc.com/forum/attachment.php?aid=929127&k=c994f2349e470c8482fc9fedce84b620&t=1781447022&sid=3NrJfjN6F2

作者: zonebaby 時間: 2009-8-18 15:22
後記:暫時未有...
作者: jackli 時間: 2009-8-18 20:21
整出黎比你玩果個先覺得複雜嫁嘛

