VERSION 5.00 Begin VB.Form Form1 Caption = "IO" ClientHeight = 1020 ClientLeft = 60 ClientTop = 360 ClientWidth = 1695 LinkTopic = "Form1" ScaleHeight = 1020 ScaleWidth = 1695 ShowInTaskbar = 0 'False StartUpPosition = 3 'Windows Default Begin VB.CommandButton Command1 Caption = "Set" Height = 255 Left = 1080 TabIndex = 2 Top = 720 Width = 495 End Begin VB.TextBox Text1 Height = 285 Left = 240 TabIndex = 1 Text = "5000" Top = 720 Width = 615 End Begin VB.Timer Timer3 Interval = 10 Left = 960 Top = 360 End Begin VB.Timer Timer2 Interval = 200 Left = 2160 Top = 600 End Begin VB.Timer Timer1 Interval = 10 Left = 360 Top = 360 End Begin VB.Label Label1 Caption = "Label1" Height = 375 Left = 480 TabIndex = 0 Top = 120 Width = 735 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Dim OutputINT As Integer, IOREAD1 As Integer, IOREAD2 As Integer, IntVal As Integer Private Sub Command1_Click() IntVal = Text1.Text End Sub Private Sub Form_Load() IntVal = Text1.Text End Sub Private Sub Timer1_Timer() Dim cond As Integer, cond2 As Integer Open "C:\Inetpub\wwwroot\EC\water.txt" For Input As #1 Input #1, cond If cond = 8 Then IOREAD1 = 128 Else IOREAD1 = 0 End If OutputINT = IOREAD1 + IOREAD2 Call vbOut(888, OutputINT) Close #1 End Sub Private Sub Timer2_Timer() Label1.Caption = vbInp(888) End Sub Private Sub Timer3_Timer() Open "C:\Inetpub\wwwroot\EC\gostopback.txt" For Input As #2 Input #2, cond2 If cond2 = 5 And Timer3.Interval <> IntVal Then IOREAD2 = 16 Timer3.Interval = IntVal Close #2 Exit Sub Else IOREAD2 = 0 Close #2 Timer3.Interval = 10 Open "C:\Inetpub\wwwroot\EC\gostopback.txt" For Output As #2 Write #2, 1 Close #2 End If End Sub Attribute VB_Name = "Module1" 'Program Name: IO 'Author: Alex Skibinsky 'Date created: 12/01/2002. 'Purpose the program sends bits to parallel port. 'It was featured on capital 9 news around that date. Declare Sub vbOut Lib "WIN95IO.DLL" (ByVal nPort As Integer, ByVal nData As Integer) Declare Sub vbOutw Lib "WIN95IO.DLL" (ByVal nPort As Integer, ByVal nData As Integer) Declare Function vbInp Lib "WIN95IO.DLL" (ByVal nPort As Integer) As Integer Declare Function vbInpw Lib "WIN95IO.DLL" (ByVal nPort As Integer) As Integer