For me most of the fun in electronics is building the stuff. For instance my QuadCopter project is not as much flying, even though I'm looking forward to that part as well, but more about the technology and building.
So telemetry is an important factor for me building the QuadCopter. MultiWii offers a lot of data though the serial port (USB kabel) which can be shown i MultiWiiConf which is include when you download the MultiWii software. I also just yesterday found that there is a MultiWii WinGUI which is a .NET based windows interface. The last one is not as simple and all the information you see on one page with MultiWiiConf is in WinGUI split over several pages. But the last one gives a lot of options for logging and analyzing which is impressive.
So when I started out on this project I have my QuadCopter wired via the USB to the PC to get data. But needless to say that gave me a lot of limitation. The cord prevented it really from movement and it also did have some influence on the gyro.
Then I figured out that my Bluetooth shield was the solution. And it was quit easy. I will make another post about why not put the shield on top of the MEGA but rather just connect them using wires.
First you need to setup the Bluetooth. I use a shield from iteadstudion.
Set the switch and the jumpers into command mode. See more about that on this page.
Make sure you load the board with a empty sketch. Just a empty setup and loop kind of thing :)
Then connect with a serial monitor to the Arduino. I use Roger Meiers Cool Term but you can use the one with Arduino IDE as well. Baud rate is always 38400 when it is in command mode.
The set the following commands, dont type text in italic its just an explanation (Just type them in one line at the time follow by an Enter):
AT just a way of saying hallo to the "modem". Should respond with OK
AT+NAME=Quad this is the name your PC will see when it is discovered
AT+ROLE=0 set it into slave mode
AT+UART=115200,1,0 this is the baud rate for communication with the MultiWii software
If you are unsure how this AT command is done then read this.
This is pretty much it. You can read the documentation for other settings including the pin code. Default is 1234 and that's good enough for me :)
Then set the jumpers to D0 and the switch to data. See the link for at description of how to do that above.
Now all there remains is connection pin 0 on the shield to pin 0 on the Arduino and the same for pin 1. Then connect 5V and ground between the shield and the board and you are good to go.
Please note that when you are using the USB to program or what ever, then you need to cut the power to the shield to avoid conflicts.
Discover the Bluetooth on your PC and you can connect to that COM port from either MultiWiiConf or WinGUI. As simple as that.
There are also apps for Android and iPhone to mange some off the things using bluetooth. Haven't used any of them as I have been quite happy with the options of using my laptop. But never the less it might be worth looking into
No comments:
Post a Comment