I have a Serial Bluetooth Twig on the way but am wondering if it is possible to program the Arduino over this link -and if so, what needs to be done to enable this (if anything)?
Many thanks, in advance
I have a Serial Bluetooth Twig on the way but am wondering if it is possible to program the Arduino over this link -and if so, what needs to be done to enable this (if anything)?
Many thanks, in advance
Whoopah! My Blootooth Twig arrived today. 10 days shipping - pretty good. Had to laugh at the Royal Mail parcel tracking service thoughā¦ for the past week it said: āSTATUS: On itās way.ā !!
Initial disappointment with the connector (!) was abated once I pulled the white plastic āshellā off the pins and then found another non-compatible plug in my bucketāoābits that had the same pin spacing and just slid onto the pins.
NOTE to anyone else considering this purchase - order the conversion cable to go with it (in packs of 5!) or make a plan.
After a frustrating while with it hooked up and loaded with the example code from the wiki page - I finally came to the day-break-moment that my diligent wiring of the four pinsā¦ +ve, gnd, Rx, Tx ā¦ was flawed.
NOTE to anyone else as dumb as meā¦ Rx goes to TX, Tx goes to Rx. (NOT Rx-Rx, Tx-Tx !!)
So now on with the show. Iām hoping to have it talk to Director. Iāve got it paired my Powerbook and Iām starting to copy the BT code fragments over to my project.
QUESTION: does all the initialisation have to be performed every time the sketch runs? - does the BT module forget itās configuration every time?
Turns out that including āb[/b]ā before a blueToothSerial.read() makes all the difference!
while (blueToothSerial.available()){
// Serial.println();
Serial.print((char)blueToothSerial.read());
}
ā¦works for me!
In SerialMonitor I can see numbers coming in (bytes!) instead of characters. This explains a lot.
My problem now is how do I send Carriage Returns over the BlueTooth Serial link??
Iām using the Messenger library to decipher strings that I send from Director. Messenger needs a Carriage Return to delimit the messages. Iāve tired the usual " & RETURN" method from Director and an assortment of other things like ā& CRā or ā\rā but to no avail.
Answers on a postcardā¦
Having to move over to the CmdMessenger library - which allows custom message delimiters rather than only Carriage Returns.
After many, many hours of hacking and troubleshooting Iāve finally got Director talking over Bluetooth to the Arduino.
Iām using CmdMessenger Library which uses ā;ā as a message delimiter because I donāt seem able to send Carriage Returns over the BT link. (otherwise Iād have stayed with Messenger Library which I was already successfully using over USB).
I couldnāt have done it without all the helpful input that Iāve received from this forum thread however! ā Thank you, er, me.
I will say that dreamcat4ās comment over at http://arduino.cc/forum/index.php/topic,54296.0.html saying that he has CmdMessenger working over a NewSoftSerial (v11) Library connection was about the only external encouragment Iāve had - armed with that information I stripped my project code chunk by chunk into a new project until the whole thing hung together and worked.*
I hope this is of use to someone else.