Help? Wireless data transfer from PC to BS2
FungusOpus
Posts: 4
Hello,
I'm involved in a project building a small vehicle (looks kinda like a skateboard) that is controlled by a BASIC stamp 2 on a Board of Education (USB). As part of the project, we have a Visual Basic .NET program running on a computer that calculates some data to be used by the vehicle as it operates. How can I easily get this data sent from the VB.NET program to the BS2?
I would prefer to do it wirelessly, but we can't use the eb500 because it would use up too many I/O pins that we need for other components. We're likely using the Memory Stick Datalogger in order to store data via USB, so I'd assume that the goal is to get the required data from the VB.NET program (on the separate PC) to the USB memory attached to the BS2 (on the vehicle)... but what's the best way? Can I go wireless via Bluetooth some other way, or should I resort to a cable connection? And what will I need?
Thanks in advance, any advice will be extremely helpful.
I'm involved in a project building a small vehicle (looks kinda like a skateboard) that is controlled by a BASIC stamp 2 on a Board of Education (USB). As part of the project, we have a Visual Basic .NET program running on a computer that calculates some data to be used by the vehicle as it operates. How can I easily get this data sent from the VB.NET program to the BS2?
I would prefer to do it wirelessly, but we can't use the eb500 because it would use up too many I/O pins that we need for other components. We're likely using the Memory Stick Datalogger in order to store data via USB, so I'd assume that the goal is to get the required data from the VB.NET program (on the separate PC) to the USB memory attached to the BS2 (on the vehicle)... but what's the best way? Can I go wireless via Bluetooth some other way, or should I resort to a cable connection? And what will I need?
Thanks in advance, any advice will be extremely helpful.
Comments
A BS2 (or other uC) on the transmitter side.
A transmitter
A receiver
A BS2 (or other uC) on the reciever side.
A wire to the computer
A computer
The above listing also demonstrates the flow of information. Bottom up for Computer to robot, top down for robot to computer. For transmitters/recievers (transcievers would also work for bidirectional communication) look for something that takes serial strings and outputs serial strings. If I'm not mistaken, most of those at sparkfun do that, and the parallax ones do too (and are well documented for the BS2).
You'll have to figure out how you want to get data between the base station (connected by wire) to the computer: as I said, you can use a COM port function in VB (I have no idea how to do this...) or you can get your program to interact with the debug terminal.
www.theabramgroup.com/basicstamp/
Alternatively, you might want to look at the PLX-DAQ software here:
www.parallax.com/tabid/441/Default.aspx
In your case, you'd communicate with a BS2 which was connected to a transmitter, which would communicate with your robot through a receiver mounted there. If you do this, set it up with JUST the transmitter on one BS2 and the receiver on another, and get those communicating first. Then figure out how to send the data through VB and a serial cable to the transmitting BS2. Then put the pieces together.
Now, I've been looking at the Parallax RF Transmitter/Receiver documentation. The receiver has five pins, but in the connection diagram only one appears to be marked as going into an I/O pin. So does the receiver only require one I/O pin and not five? (I've confirmed with my project group that our BS2 only has 3 I/O pins left.)
We can't obtain another BASIC stamp, so I think the transmitter needs to connect to the computer. The Parallax page mentions the following: This device can be connected to a PC serial port using a MAX232 line driver. The circuit isn't supported by Parallax, but it's possible to make this connection with a few dollars of parts. I'm not sure what this means... What are these parts, and will I need them?
+5v power
Ground
Serial data in
a special powerdown pin to enter a low power mode (you don't need to mess with this at all)
a received signal strength indicator pin that puts out an analog signal indicating how strong the received signal is. You don't need to touch this one either.
It'll only require one Stamp I/O pin, as you hoped.