BS2 to vb.net
Hi all
I'm working on a class project and need to work with a BS2 and interface with it in Visual Basic.net. I have looked through the resources currently in the archive and haven't found much about passing strings between the two.
In short the project involves getting a BS2 to read information from a sonic range finder and then transmit the information back to a VB.net program and display it in nice big numbers for all to see. I'm able to get the range finder to operate but getting VB.net to see the BS2 is giving me great ammounts of trouble thus far. The following is a example code that I can't seem to get to work.
If serialPort.IsOpen Then
serialPort.Close()
End If
Try
With serialPort
.PortName = "COM4"
.BaudRate = 9600
.Parity = IO.Ports.Parity.None
.DataBits = 8
.StopBits = IO.Ports.StopBits.One
End With
serialPort.Open()
Thanks
Bryan
I'm working on a class project and need to work with a BS2 and interface with it in Visual Basic.net. I have looked through the resources currently in the archive and haven't found much about passing strings between the two.
In short the project involves getting a BS2 to read information from a sonic range finder and then transmit the information back to a VB.net program and display it in nice big numbers for all to see. I'm able to get the range finder to operate but getting VB.net to see the BS2 is giving me great ammounts of trouble thus far. The following is a example code that I can't seem to get to work.
If serialPort.IsOpen Then
serialPort.Close()
End If
Try
With serialPort
.PortName = "COM4"
.BaudRate = 9600
.Parity = IO.Ports.Parity.None
.DataBits = 8
.StopBits = IO.Ports.StopBits.One
End With
serialPort.Open()
Thanks
Bryan
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
There are plenty of resources for VB and BASIC Stamps lately. There has been much discussion on the forums in general, but there have also been several projects posted in the Completed Projects forum, most with source code. There’s a VB.net application for the Parallax Servo Controller and another for the RFID Reader that immediately come to mind. Also, Jan Axelson, author of several books has an article in the April 2008 Nuts & Volts magazine on this very subject. You can get some information from her website at www.lvr.com· I hope this helps. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
http://forums.parallax.com/showthread.php?p=671804
Jeff T.
I do have question about getting the BS2 to receive a string (I.E a word) at the the moment I can only get it to send one character, so if I was to send a word, say, "Parallax", all I receive on the other end is "P". Dose the SERIN command only receive one letter at a time?
Thanks for the help
Statements might look something like:
When you input "parallax" now, that's what you'll get out.