- configure Bluetooth transceiver on ITeaduino BT
- ensure Bluetooth on the connecting computer (i.e. laptop in our case) is configured correctly
- initiate Bluetooth device pairing between computer and ITeaduino BT
- configure S4A properly
- test connection running a program - e.g. make LED blink on Arduino's D13
The following links prooved helpful to me:
- http://www.linotux.ch/arduino/iteaduino_bt.html
- http://techwatch.keeward.com/geeks-and-nerds/how-to-configure-and-use-an-iteaduino-bt/
- http://blog.iteadstudio.com/warless-program-your-iteaduino-bt-2/
1. Configure Bluetooth transceiver on ITeaduino BT
After having tested the ITeaduino BT working in "normal" cable connection, I started configuring its Bluetooth transceiver. As described in Benjamin Bellamy's blog I set the Arduino clone to transceiver programming mode. How to configure the used HC-05 module can be found on the first link provided above.In configuring the transceiver module I used the parameters given in ITead Studio's blog:
- 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)
N.B. I'm using the Arduino 1.5.4 r2 development tool - but I have NOT exchanged the “rxtxserial.dll” file as suggested. If I'm remembering correctly, I ran into problems with doing that...
I've also played with adding the the 1uF capacitor to the ITeaduino BT as described - but finally removed it again as I didn't want to programm the Arduino via Bluetooth (YES, this really works!!!)
2. Configure Bluetooth on the connecting computer
This seems to be a no-brainer. But with me it turned out to be a bit of a challenge to get the correct Bluetooth driver for Windows 8. Make sure it works correctly with another device e.g. a smartphone. And... at least for me, this took a considerable amount of time...3. Initiate Bluetooth device pairing
This is really straight forward: initiate Bluetooth pairing as described in ITead Studio's blog or as you're used with any other device. Don't forget the virtual serial port you're using for your Arduino...4. Configure S4A properly
Using S4A 1.5 you have to program your Arduino with thw according firmware (S4AFirmware15.ino). To be shure, you should do this the "normal" way with an USB cable. Once downloaded to the Arduino I encountered S4A couldn't detect the Arduino, on the serial monitor you could see the Arduino send some gibberish.A crosscheck with the S4A firmware helped on: at the very beginning of this sketch a data rate of 38400 baud is configured, whereas I've set the Arduino's Bluetooth transceiver to 57600 baud (see above). I decided to change the baud rate in the S4A firmware sketch instead of reprogramming the Bluetooth transceiver. And - heureka - S4A detects the ITeaduino BT via Bluetooth.
5. Test your connection from S4A
Once S4A detects your Arduino clone, you'll find it is working properly with your first Scratch program...Mission accomplished.
Thanks, very good post. Please upload the code for s4a communication with blutooth.
ReplyDeleteYou can find the appropriate Arduino firmware in the download section of Scratch 4 Arduino (http://s4a.cat) -- the direct link to the latest version (V1.6 by now): http://vps34736.ovh.net/S4A/S4AFirmware16.ino
DeleteThis comment has been removed by the author.
ReplyDeleteYour post and others were helpful to me in getting S4A to communicate with my Arduino Uno through an HC06. I can connect at 57600 and start to run a Scratch project (I can see values on the sensors and activate motors). However after a short time (30 seconds to a minute or so) S4A freezes and the BT connection drops (HC06 goes back to blinking).
ReplyDeleteAny ideas?