View Single Post
Old 08-03-2001, 08:20 PM   #11
presslab
Newbie
 
Join Date: Jun 2001
Location: Sebastopol, CA
Posts: 55
Post

Here is a snippet of code on the serial port side of things:

MSComm.Settings = "9600,s,8,1"
MSComm.PortOpen = True

If MSComm.PortOpen <> True Then MsgBox "Port failed to open"

If Not MSComm.DSRHolding Then ' data set ready low (car power is off), shut down PC when timeout occurs
shutdownCtr = shutdownCtr + 1
shutdownStatus = playing
WinAmpPause
If shutdownCtr >= 5 Then
Shutdown EWX_SHUTDOWN 'shut down the computer
shutdownCtr = 0 'clear counter so we don't shutdown again
End If
End If
presslab is offline   Reply With Quote