3pi Wireless Bluesmirf

Hi,

I connected a BlueSmirf Gold to the TX and RX pins of the 3pi, hoping to achieve wireless control. The 3pi has the slave program loaded onto it and I successfully managed to make a bluetooth connection between the connected BlueSmirf and my pc, on bluetooth serial port com 11. I tried using Tera Term to drive the 3pi’s motors simply by sending 0xC1 but there was no response. Surely I am missing a step somewhere or am not entering required parameters?

My goal is to control the 3pi manually by using a C# GUI and the keypad and then when required be able to press a button in the gui to activate an automatic line following mode.

Would appreciate any help or sample code :slight_smile:

Thanks in advance,

Rohan

Hi Rohan,

I could be wrong, but I don’t believe that sending 0xC1 by itself will generate a response. According to the documentation for the serial slave program here, the command byte should be followed by a speed byte between 0 and 127. What happens when you send a 0xC1 followed by 0x46? This should set motor 1 to a speed of 70.

Also, if you’re looking for C# GUI code, you might take interest in my own project which is similar to your own in some respects. While this is a blatant self-promotion, you might find this useful: Keyboard numpad remote-control of 3pi. Videos and all source code (C, C#, etc.) are available. Please note that this C# project is intended to be used with my own 3pi remote control program, and so in order to use the C# program (with the serial slave program) you will need to change it. Doing so would be fairly straightforward.

Hope this helps,
Geoff

Hi, Rohan.

Geoff is right about the protocol. Also, please note that if you type “0xC1” into TeraTerm, it is likely that you are sending the ASCII characters ‘0’, ‘x’, ‘C’, and ‘1’. You can try using the Pololu Serial Transmitter utility for Windows, which supports sending bytes from hex inputs.

- Ryan

Hi guys,

Thanks very much for your input, very much appreciated!

Geoff that is not blatant self promotion but in fact very useful haha.

I realized I was making a few errors including not using the correct terminal program and not sending a motor speed. Also the default baud rate of the bluesmirf is 115,200, to change this to 9600 you have to transmit $$$ in tera term and then set the baud rate to 9600 via SU,9600. Even once this has been done, I am still not able to get any feedback what so ever from the 3pi which is a bit disheartening. I have asked the manufacturers of the bluesmirf if I am doing something wrong, so hopefully they will be able to help out.

Cheers,

Rohan

Hi,

woops upon checking the serial slave program I was sposed to have the baud rate at 115.2 k, so I changed that back. Still no response from the 3pi tho, not even getting a bad cmd message and beep from the 3pi. For example if I use the Pololu serial transmitter, establish a bluetooth connection on Bluetooth serial port COM 11 and then select the COM port to be 11 in the serial transmitter and send 0xB3 as a single byte ( which should play music) the 3pi has no response. Almost as if nothing is connected to the TX and RX pins

If anyone could point me in the right direction that would be most helpful

cheers again

Hi,

I tried a simple loop back test by connecting the rx and tx pins together on the bluesmirf and sending out data, but nothing returned. Therefore it must definitely be a problem with the bluetooth module

Cheers

Rohan

When you do the loopback test, how are you powering the Bluesmirf? Could you describe what the connections were when you had it connected to your 3pi? A picture of your setup might help us notice other problems.

- Ryan

Hi Ryan,

The bluesmirf is still being powered by the Vcc pin on the 3pi when performing the loop back test. The only difference between the loop back test and the 3pi connection is that for the loop back I have the TX and RX pins of the bluesmirf connected together.

Thanks in advance,

Rohan




It sounds like you have isolated the problem as the BlueSMiRF, which, unfortunately, we do not have much experience with. I have never seen someone connect RX to CTS like you do in your schematic. The wiring example that SparkFun links to does not do that. Can you try not doing that? Do you have a separate power supply you can use with the BlueSMiRF so that you can do the loopback test in the most isolated way?

- Ryan