Private Sub Botenter_Click()
Txtran.Text = 2
MSComm1.Output = Txtran.Text "se transmite 2 correspondiente a led boton enter
End Sub
Private Sub Botfrio_Click()
Txtran.Text = 1
MSComm1.Output = Txtran.Text " se transmite 1 correspondiente a led boton frio
End Sub
Private Sub Bothist_Click()
"Abrir ventana con informacion y menues para ver historicos
End Sub
Private Sub Botprog_Click()
Dim MiVar
MiVar = MsgBox("Va a entrar en modo programación, si acepta deberá esperar 8 segundos aproximadamente", 65, "Aviso de Sistema"

If MiVar = 1 Then
Txtran.Text = 6
MSComm1.Output = Txtran.Text " se transmite 6 correspondiente a comando programacion
End If
End Sub
Private Sub Botreset_Click()
Dim MiVar
MiVar = MsgBox("Va a resetear termostato, si acepta deberá esperar 11 segundos aproximadamente", 65, "Aviso de Sistema"

If MiVar = 1 Then
Txtran.Text = 7
MSComm1.Output = Txtran.Text " se transmite 7 correspondiente a comando reset
End If
End Sub
Private Sub Botsalir_Click()
MSComm1.PortOpen = False
End
End Sub
Private Sub Botset_Click()
Dim MiVar
MiVar = MsgBox("Va a cambiar Set Point de Termostato, si acepta deberá esperar 5 segundos aproximadamente", 65, "Aviso de Sistema"

If MiVar = 1 Then
Txtran.Text = 5
MSComm1.Output = Txtran.Text " se transmite 5 correspondiente a comando setpoint
End If
End Sub
Private Sub Form_Load()
Dim CommPort As String, Handshaking As String, Settings As String
Dim buferentrada As String
MSComm1.CommPort = 1 "puerto com1
MSComm1.PortOpen = True "se abre el puerto para que funcione
End Sub
Private Sub MSComm1_OnComm()
MSComm1.Settings = "9600,n,8,1" "configuracion del puerto serie
"MSComm1.InputMode = 0 " (0):texto, (1):binario
"InputMode = comInputModeBinary
End Sub
Private Sub Timer1_Timer()
Dim primerdato As String
Dim segundodato As String
MSComm1.InputMode = 1 " (0):texto, (1):binario
primerdato = MSComm1.Input
Text1.Text = primerdato "el puerto serie
"Text1.Refresh
End Sub