Pages: [1]   Go Down
Author Topic: Upload Program To Arduino With BT Shield  (Read 2556 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 70
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The BT shield v2.2 use the same Bluetooth module as Iteaduino BT, we can hack it and make it a wireless programmer for Arduino as well. Here we take a Iteaduino with BT shield as a example, to show you how to upload the program to Arduino via Bluetooth.


1. Welding a 1uF capacitor between Pin32 of HC-05 module and the Rest pin of BT shield.

2. Set the jumpers on BT Shield: D0 with TX, D1 with RX. Set the mode switch of operation mode to CMD side.

3. Connect the Iteaduino with PC via USB cable, and open the “AccessPort” software:

- Choose the right COM number
- Change the baud rate to 38400


4. Send the AT command to change some configurations of the HC-05 module:

AT+ORGL (Restore the default state)
AT+ROLE=0 (Configure the HC-05 as slave)
AT+POLAR=1,0 (The LED will on when the output of PIO8 is high. And it indicates connecting successfully when the output of PIO9 is low.)
AT+UART=57600,0,0 (Set baud rate to 57600, one stop bit and no parity bit)
AT+INIT (Initializing SPP library)
5. Download Arduino IDE  (don’t use the Arduino 00xx) . Download the “rxtxserial.dll” file here, and replace the one in your Arduino IDE 1.5 Folder.

6. Disconnect the Iteaduino with PC, and reset the jumpers: D0 with RX and D1 with TX. Put the mode switch to DAT side.

7. Repower the Iteaduino, and use the laptop or PC to search the BT shield (if your PC doesn’t support Bluetooth, we recommend this Tiny USB Bluetooth Adapter )

8. Enter pin code “1234” and connect to the BT shield. Check the COM number of the serial Bluetooth port (When you check in Hardware Device Manager, it will show you 2 ports , and just one can be used for wireless programming)


9. Open Arduino IDE 1.5. You should select “Tools->Board->Arduino Duemilanove w/ATmega 328″. And select “Tools->Serial Port->COMX (the serial port of the Bluetooth device)”.

10. Press the “Upload” button, the program will be upload into Iteaduino by Bluetooth !

Note: This is an example for Iteaduino (Arduino Duemilanove), if you are using the Iteaduino UNO (Arduino UNO), there are some different:

Using the AT+UART=115200,0,0 but not the 57600 now
Choose the “Arduino UNO” instead of the “Arduino Duemilanove w/ATmega 328”
More step by step tutorials, you can find it here <Wireless Programming Your Iteaduino BT>.
« Last Edit: November 13, 2012, 04:45:03 am by ITead » Logged

Itead Studio - Make innovation easier

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 72
Posts: 7171
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Interesting. This might be neat for updating firmware. You said download the rxtxserial.dll here but there is no link. Why do you have to write a different dll? What is the different between original arduino dll and yours? Very curious to find out. Thanks.
Logged


0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 70
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Interesting. This might be neat for updating firmware. You said download the rxtxserial.dll here but there is no link. Why do you have to write a different dll? What is the different between original arduino dll and yours? Very curious to find out. Thanks.
When the BT shield connect to PC, there will be 2 COM Port, but the old dll will just show one in the Arduino IDE port menu, but the one can not use, so this dll will find 2 port and show them in the IDE, you can choose the right one for program.
Logged

Itead Studio - Make innovation easier

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 72
Posts: 7171
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

athanks. Did you mean the bluetooth adapter shows up as two serial ports? The bluetooth shield is only connected to pc via arduino first. If I am right, then I can just use xcode program to choose the right serial port to load hex program, right?
Logged


Pages: [1]   Go Up
Jump to: