Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: MaltiK on December 09, 2008, 05:28:04 PM

Title: Bluetooth/Controller on MCU Thru Laptop?
Post by: MaltiK on December 09, 2008, 05:28:04 PM

Ok, so heres the pseudoschematic:

Windows Controller -> Laptop -> C Code -> Hyperterminal -> Bluetooth Dongle -> BlueSMIRF -> MCU -> Actuators

Does anyone know of any C code that basically transmits packets of information (TX) from bluetooth to a bluetooth modem with UART (RX). I know I will have to configure the Baud rate and everything, and I think Hyperterminal can help with this but I am not sure.

What I basically want to do is use a standard Windows Controller on my Vista Laptop and when I use the left trigger or so, the motors on say Output 1 will go to high, and when I let go of the trigger, it will go to low.

I will have to read what kind of packets(?) are sent when each button is pushed on the controller?

I am thinking what I have to do is interface a controller with Hyperterminal, configure Hyperterminal to send packets thru the bluetooth dongle, and like I said, thru UART, set each output to high or low based on the pressed button


Is this practical or has been done?

Can anyone help me with this?
Title: Re: Bluetooth/Controller on MCU Thru Laptop?
Post by: Admin on December 15, 2008, 04:38:23 AM
You can treat your USB/bluetooth port like any other serial port. Most languages for your PC should give you the option to send serial data directly through serial (hyperterminal not required).

Choose a language, then google around for it. Tons of source code online.
Title: Re: Bluetooth/Controller on MCU Thru Laptop?
Post by: MaltiK on December 15, 2008, 02:34:48 PM
I have checked many different codes, none come even close to doing what I want. Can you point me in the right direction? ^^
Title: Re: Bluetooth/Controller on MCU Thru Laptop?
Post by: pomprocker on December 15, 2008, 05:28:29 PM
Yeah I have my $50 robot configured to do that with a BlueSMiRF, I hit "h" for (h)old and it stops moving. I hit 'r' for (r)eset and it activates the watchdog timer and the mcu resets
Title: Re: Bluetooth/Controller on MCU Thru Laptop?
Post by: Admin on December 15, 2008, 08:31:11 PM
Quote
I have checked many different codes, none come even close to doing what I want. Can you point me in the right direction? ^^
errrrr the photovore sample code that comes with the Axon has good values already ;D

I suspect there is something else that you aren't doing right . . . can you share what you are doing?