by dshinsel » Wed Mar 29, 2006 6:40 am
by dshinsel
Wed Mar 29, 2006 6:40 am
Hi
I just received my RoboNova this weekend, and got it put together.
I also got a BlueSmurf module, and I have it working in the RoboNova. It works great!
I can transmit and receive.
Here's a couple of notes:
1. You do NOT need a MAX232. The out puts of the controller are 5v, and the BlueSmirf is also TTL (5v).
2. Make sure you power the BlueSmirf off of 5v, not the Servo power. The pins at the top of the controller (including the ETX, EAX and all the A/D pins) have 5v.
3. Connect as follows:
' Bluetooth (BlueSmirf) Setup:
' BS_TX <--> ETX
' BS_RX <--> ERX
4. If you get the a "Smirf Extended" version (with RTS/CTS control), short the RTS/CTS together. I just put a jumper between the pins.
5. Bluetooth can be weird on some computers. My laptop reports COM18 Input Port, and COM19 Output Port. The IN/OUT threw me at first. It really means who established the communication, the PC or remote module. In the case of BlueSmirf, it seems to always use the IN Port. If you only get one COM port, don't worry about it.
6. Here's some code I wrote to test this out. Use Hyperterm to test. I set everything at 9600 baud for testing.
DIM TxOut AS BYTE ' RS-232 output on ETX
DIM RxIn AS BYTE 'RS-232 input on ERX
--> this part should look familiar:
'================================================
MAIN:
'GOSUB robot_voltage
'GOSUB robot_tilt
--> Add this:
' ===============================================================
' Bluetooth I/O with PC
TxOut = "T"
ETX 9600, TxOut
TxOut = "e"
ETX 9600, TxOut
TxOut = "s"
ETX 9600, TxOut
TxOut = "t"
ETX 9600, TxOut
TxOut = " "
ETX 9600, TxOut
FOR RxCount = 0 TO 4
TxOut = 48 + RxCount 'ASCII 0=48, A=65, a=97
ETX 9600, TxOut
NEXT
TxOut = "["
ETX 9600, TxOut
FOR RxCount = 0 TO 15
ERX 9600, RxIn, NoRetry
ETX 9600, RxIn
NoRetry:
NEXT
TxOut = "]"
ETX 9600, TxOut
Hi
I just received my RoboNova this weekend, and got it put together.
I also got a BlueSmurf module, and I have it working in the RoboNova. It works great!
I can transmit and receive.
Here's a couple of notes:
1. You do NOT need a MAX232. The out puts of the controller are 5v, and the BlueSmirf is also TTL (5v).
2. Make sure you power the BlueSmirf off of 5v, not the Servo power. The pins at the top of the controller (including the ETX, EAX and all the A/D pins) have 5v.
3. Connect as follows:
' Bluetooth (BlueSmirf) Setup:
' BS_TX <--> ETX
' BS_RX <--> ERX
4. If you get the a "Smirf Extended" version (with RTS/CTS control), short the RTS/CTS together. I just put a jumper between the pins.
5. Bluetooth can be weird on some computers. My laptop reports COM18 Input Port, and COM19 Output Port. The IN/OUT threw me at first. It really means who established the communication, the PC or remote module. In the case of BlueSmirf, it seems to always use the IN Port. If you only get one COM port, don't worry about it.
6. Here's some code I wrote to test this out. Use Hyperterm to test. I set everything at 9600 baud for testing.
DIM TxOut AS BYTE ' RS-232 output on ETX
DIM RxIn AS BYTE 'RS-232 input on ERX
--> this part should look familiar:
'================================================
MAIN:
'GOSUB robot_voltage
'GOSUB robot_tilt
--> Add this:
' ===============================================================
' Bluetooth I/O with PC
TxOut = "T"
ETX 9600, TxOut
TxOut = "e"
ETX 9600, TxOut
TxOut = "s"
ETX 9600, TxOut
TxOut = "t"
ETX 9600, TxOut
TxOut = " "
ETX 9600, TxOut
FOR RxCount = 0 TO 4
TxOut = 48 + RxCount 'ASCII 0=48, A=65, a=97
ETX 9600, TxOut
NEXT
TxOut = "["
ETX 9600, TxOut
FOR RxCount = 0 TO 15
ERX 9600, RxIn, NoRetry
ETX 9600, RxIn
NoRetry:
NEXT
TxOut = "]"
ETX 9600, TxOut