Powered By Blogger

viernes, 14 de octubre de 2011

Codigo de fuente "Actualizado"

Hoy pudimos hacer funcionar las salidas de la alfombra y aqui les dejamos una muestra del codigo fuente del modulo.

Private Bichitos(8) As String
Private valorpuerto As Integer
Private LUZ1 As Integer


Private Sub Command1_Click()
'MsgBox (Combo16.ItemData(Combo16.ListIndex))
MsgBox Bichitos(Combo16.ListIndex)
End Sub
Private Sub Form_Load()
Bichitos(0) = "Guau"
Bichitos(1) = "Miau"
Bichitos(2) = "Pipí"
Bichitos(3) = "Hijijij"
Bichitos(4) = "Auuuuú"
Bichitos(5) = "Grrrr"
Bichitos(6) = "Muuuuú"
End Sub
Private Sub Timer1_Timer()
Dim i As Integer
Dim reg As Integer
Dim text As String
Dim entrada As Integer
i = 1
reg = Inp(&H379)
ch.Value = False
Do While i = 1
   
    entrada = Inp(&H379)
   
    If entrada = 120 Then
        prob.BackColor = &H8000&
        prob1.BackColor = &HC00000
        prob2.BackColor = &HFFFF&
        prob3.BackColor = &HC0&
        prob4.BackColor = &HC000C0
        i = 2
        valorpuerto = 0
        Out &H378, valorpuerto
    End If
   
    If entrada = 56 Then
        prob.BackColor = &HC000&
            i = 2
            valorpuerto = 1
            Out &H378, valorpuerto
    End If
    If entrada = 248 Then
        prob1.BackColor = &HFF0000
        i = 2
        valorpuerto = 2
        Out &H378, valorpuerto
    End If
   
    If entrada = 88 Then

No hay comentarios:

Publicar un comentario