So I haven't forgotten about you. I've been playing with my Arduino Mega 2560 over the weekend. I got away from the LabVIEW Interface for Arduino because of its various glitches, speed, etc... The Arduino is actually really easy to program. I was told this many times, but I never really tried it out.
It has the power of C++ with the simplicity of the Basic STAMP from Parallax. There's tons of open source code and libraries available, so you can probably find a project where someone implemented an Arduino in a blimp.
As far as communication and control goes, you can still use LabVIEW. You'll have to develop your own communication protocol for it, but it shouldn't be too bad.
Some things to keep in mind. It's usually considered good practice to always include some type of a sync word, meaning that you have a number that increments with each packet of data you send. That way, if you detect a packet out of order (number sent was less than last packet), you'll trash it.
I've been using the
BlueSMiRF RP-SMA. There's little configuration to get it working fairly well. I haven't found the max distance yet, but to note, this isn't FCC Legal, as they have changed the antenna configuration.
Quote:
|
Because we have changed the antenna configuration on the Bluetooth module, the FCC certification is no longer valid. But the module is completely suitable and legal for all home, hobby, and research applications.
|
I find the best way to send data is using a new line '\n' (ASCII DEC 10 or HEX 0xA) as the termination character. You can create an event driven while loop in LabVIEW using the termination character. On the Arduino side, you'll have the SerialEvent() function, which is triggered on a serial receive event. You can then check to see if the newline '\n' character was sent, and if it was, then process your data.
Here's the format I would use:
"[SYNC_WORD_32_BITS][MOTOR1_VALUE_8_BITS][MOTOR2_VALUE_8_BITS]...[MOTORN_VALUE_8_BITS][DIGITAL_OUTPUTS_GROUP_8_BITS]...[DIGITAL_OUTPUTS_8_BITS][CONTROL_WORD_FOR_SPECIAL_FUNCTIONS]\n"
For receiving back data, the format will be very similar. You'll have a sync word and sensor values. You'll want to look at an ASCII table, and you should note that sending over raw data values is a no-no for the BlueSMiRF unless you format it properly. You'll have data loss, as it doesn't pass through some values. If one of your sensors sends back a 10, then you'll trigger it to send the data. Try to convert all of your sensor values to ASCII text and ASCII number values. It uses more bandwidth, but it should still be relatively fast.
Let me know if you have any questions. The best way to get started with the Arduino is to just get started. Play with it, send numbers to it, try to echo back those numbers, then add numbers. Make an LED turn on when you send it a center character, and make it turn off if you send another one.