by Pev » Thu Aug 03, 2006 12:10 pm
by Pev
Thu Aug 03, 2006 12:10 pm
subpilot wrote:Nice work Pev. You going to keep that to yourself or release it to the world?
LOL - well this is the first PPC code I've ever written and the first serial comms app too but if you are feeling brave I am happy to share.
Its written in vb.net 2005 and requires the .NET CF Runtime 2.0 installed on your Pocket PC and that can be downloaded from :
http://www.microsoft.com/downloads/details.aspx?familyid=9655156b-356b-4a2c-857c-e62f50ae9a55&displaylang=en
Then you'll need the executable copied to your device (I haven't done an installer for it yet)
http://robosavvy.com/Builders/Pev/RobotControlPPC.zip
The first time you run the program on your PPC it will display a config screen requesting com port details. This should be the outgoing com port for your device as detailed under the BlueTooth Setting/Serial Ports, with the other settings to match your BlueSmirf (or other) bluetooth module.
NOTE: I run my setup at a lowley 9600 Baud and the RN-1 Template is set to that too
Once complete click ok and your back to the main screen.
On the main screen click file/connect and select your RN-1 Bluetooth module form the list. (Mine doesn't use a Passkey so I'm not sure what it will do if it does require one). Once the connecion is established click Initialise RN-1 to start the comms session. (There is a wait in the Template that hopefully stops spurrious characters making the RN-1 do odd things when the link is established). Then you're away with a mixer (hopefully, I've only tested this on my own IPAQ).
Button Special 1 calls the Hitec Matrix move
Button Special 2 exercises my Matt Bauer Grippers on servo ports 10,11
Button Special 3 calls the Hitech Push Ups routine
And finally the template loaded into your RN-1
http://robosavvy.com/Builders/Pev/Bluetooth_test.bas
Hivemind's Flip code (Thanks Hivemind) is in the template too but not associated with a button and you'll also find gyro code too.
PLEASE READ AND NOTE
Please be VERY VERY CAREFUL. This is very much beta code and I cannot warranty it in anyway. I'd hate for it to cause a problem or damage anyones robot. USE THIS AT YOUR OWN RISK, if you're not sure please don't do it.
This is only one way comms at the moment to the RN-1, Am still battling with the Datareceived event in .NET to get two way comms working. If anyone wants the source code let me know and I'll email it to you (But remember I am not a great programmer so it is pretty tatty).
Pev
subpilot wrote:Nice work Pev. You going to keep that to yourself or release it to the world?
LOL - well this is the first PPC code I've ever written and the first serial comms app too but if you are feeling brave I am happy to share.
Its written in vb.net 2005 and requires the .NET CF Runtime 2.0 installed on your Pocket PC and that can be downloaded from :
http://www.microsoft.com/downloads/details.aspx?familyid=9655156b-356b-4a2c-857c-e62f50ae9a55&displaylang=en
Then you'll need the executable copied to your device (I haven't done an installer for it yet)
http://robosavvy.com/Builders/Pev/RobotControlPPC.zip
The first time you run the program on your PPC it will display a config screen requesting com port details. This should be the outgoing com port for your device as detailed under the BlueTooth Setting/Serial Ports, with the other settings to match your BlueSmirf (or other) bluetooth module.
NOTE: I run my setup at a lowley 9600 Baud and the RN-1 Template is set to that too
Once complete click ok and your back to the main screen.
On the main screen click file/connect and select your RN-1 Bluetooth module form the list. (Mine doesn't use a Passkey so I'm not sure what it will do if it does require one). Once the connecion is established click Initialise RN-1 to start the comms session. (There is a wait in the Template that hopefully stops spurrious characters making the RN-1 do odd things when the link is established). Then you're away with a mixer (hopefully, I've only tested this on my own IPAQ).
Button Special 1 calls the Hitec Matrix move
Button Special 2 exercises my Matt Bauer Grippers on servo ports 10,11
Button Special 3 calls the Hitech Push Ups routine
And finally the template loaded into your RN-1
http://robosavvy.com/Builders/Pev/Bluetooth_test.bas
Hivemind's Flip code (Thanks Hivemind) is in the template too but not associated with a button and you'll also find gyro code too.
PLEASE READ AND NOTE
Please be VERY VERY CAREFUL. This is very much beta code and I cannot warranty it in anyway. I'd hate for it to cause a problem or damage anyones robot. USE THIS AT YOUR OWN RISK, if you're not sure please don't do it.
This is only one way comms at the moment to the RN-1, Am still battling with the Datareceived event in .NET to get two way comms working. If anyone wants the source code let me know and I'll email it to you (But remember I am not a great programmer so it is pretty tatty).
Pev