總網頁瀏覽量

2011年7月8日 星期五

Changes Bluetooth Baud Rate on Arduino

這次在網路上買一個NT$300左右的藍芽模組,接在Arduino上修改Baud 率,
材料:
1.Arduino Duemilanove
2.Bluetooth module (如圖)


步驟如下:
1.寫sketch如下(此BT module 的Baud rate內設值是9600), 然後download到arduino上.
   void setup()
{
   Serial.begin(9600);
   delay(1000);
   Serial.write("AT+BAUD7");   // set baud rate as 57600
}
void loop()
{
  char ser_char;
      if(Serial.available()>0)
     {
        ser_char = Serial.read();
        Serial.write(ser_char);
      }
}

2.sketch燒入後電源移除,接腳對應 BT module的 RxD接Arduino的TxD, BT的TxD接Arduino的RxD,  
    BT的Vcc接Arduino 3.3V. BT的GND接Arduino GND. BT其他兩隻腳可以不接.  
3. 腳位接好後上電源,幾秒鐘後,此時如果開Serial Monitor可以看到 AT+BAUD7的字串.
4. 這樣就已經完成修改Baud Rate.




2011年6月18日 星期六

Arduino + USB2TTL (FT232RL) + ATMEGA328P + breadboard (麵包板)

自己如果想省錢可以DIY一片 Arduino Duemilanove, 以下是我自己實驗做出來,可以燒錄程式沒問題.
所需材料如下:
1. Breadboard 麵包板一塊
2. 24 AWG 線幾條
3. 7805 Voltage regulator x 1
4. LEDs (紅色和綠色各一顆)
5. 220 Ohm resistors x 2
6. 10k Ohm resistor  x 1
7. 100nF Cap.  x 1
8. 10uF Cap. x 2
9. 16 MHz clock crystal x 1
10. USB2TTL (FT232RL) x 1 (去露天拍賣找)
11.ATMEGA328P x 1 (bootloader已燒入 Duemilanove)   (去露天拍賣找)


接下來按照下圗接法即可以完成!








重點:  Tx & Rx 接法不要搞錯,還有 USB2TTL上的JUMP要跳到5V. 紅色LED表示電源,綠色LED是arduino pin13 led(實際上接Atmega328P 的 pin 19).


接下來就可以開始玩Arduino, 有問題可以mail給我.

2011年5月29日 星期日

Arduino + Android + Bluetooth







主要是利用 Amarino 當bluetooth介面, 利用android手機的藍牙裝置來控制小汽車.
利用的材料如下:
1. Auduino board
2. Bluetooth Bee shield and Bluetooth Bee v2 module
3. L293D motor driver IC
4. 自己組裝的基礎車4WD(可以拆不要的玩具車, 我另一台車就是拆玩具車組裝)
5. 麵包板
6. DC motor 兩顆
7. 9 V 電池一顆(供Arduino板子power) 及三顆AA 1.5V電池供馬達power.



附註: 三顆AA電池不夠力, 改成四顆(1.5*4=6V)就Ok. 


我的YouTube影片: http://www.youtube.com/user/sinocgtchen

2011年5月11日 星期三

DFRduino (Arduino): changes the baud rate of Bluetooth Bee v2 on the IO Expansion Shield V5


在DFRobot IO 擴充板上修改 Bluetooth Bee v2(default 38400)的 Baud Rate 成 57600.
通常使用USB-TTL線來設定baud rate,但是如果只有Arduino板子時,可以用此法設定...

Step 1:
把 Arduino上的ATMEGA328P IC 拔起來,放到旁邊去.

Step 2:
IO Expansion的RS232/RS385 的兩個Jumper拔起,然後用杜邦線跳線,如右圖.

Step 3:
把 Bluetooth Bee v2上的switch撥到 AT mode,然後插入IO Shield上.

Step 4:
把Arduino USB接頭接到PC上電,利用SSCOM3.2的serial port tool下AT command.
SSCOM3.2設定請參考 Bluetooth Bee V2使用手册.

Step 5:
按照手冊設定完後移除電源,把藍芽模組撥回正常mode,然後ATmega328p插回板子及兩個Jumper也都插回去原來狀態.

Step 6:
開始玩 Arduino ..... (如有問題可以send mail to me )

注意: Bluetooth Bee v2 佔用 Arduino digital pin 0 and pin 1.

2010年8月25日 星期三

影像品質得調較

基本觀念: 先了解裝置(device)可以調整影像品質的參數,如Gamma table, 3D lookup table(color space transfer).
基本步驟:
1.白平衡,D50或D65的確認.
2.灰軸線性調整如Gamma調整
3.顏色轉換