I am having a problem using data from a BS2, that is coming from a BOE
that has a photodiode and AD592 from the Earth Measurements kit....the
problem is that right now, the code works as needed, but I dont
understand why. Here is the relevant part of my BS2 code
serout 16,16468,[noparse][[/noparse]" Temperature is",dec ftemp, " "]
( taken straight from the Parallax manual, I'm no pioneer )
(Ftemp of course, is my variable name for F temperature)
here is the relevant part of the VB 6 code
Private Sub cmdcon_Click()
If MSComm1.PortOpen = True Then
MSComm1.CommPort = cbocomm.ListIndex + 1
MSComm1.Settings = "9600,N,8,1" ' 9600 baud, no parity, 8 data, and 1 stop
MSComm1.InputLen = 5 ' read entire buffer
MSComm1.RThreshold = 5
MSComm1.InBufferSize = 12
MSComm1.PortOpen = True ' Open the port.
Private Sub Timer1_Timer()
Dim data As String
Data = MSComm1.Input
If Mid(Data, 1, 1) <> "s" Then
MSComm1.InputLen = 1
Do While start <> "s"
start = MSComm1.Input
StatusBar1.SimpleText = "Connected"
MSComm1.InputLen = 8
temp = Mid(Data, 1, 4)
Why cant I remove any of the text " The Temperature is" from the serout
command without messing up the way the data is received by my program?
I have poured over the manual in the serout section but cannot seem
to get this to work right. Strangely enough, this code that you see
will make the temperature update a textbox in real time......without
any of the goofy text thats in the serout command......just the
BUT! If I remove any or all of the text from the serout command, I
then get all sorts of garbage text, sometimes bits and pieces of
"The Temp is", and sometimes it crashes the app without connecting
at all! I have tried to understand how this could work...but have
run out of things to try.
Can someone help me on the serout command, because I think thats where
the problem lies.