'This program creates an oIRPD Object.
'It then uses 4 oWire Objects to copy
'the left, right and center property
'values to LEDs to show the results
'of the IRPD.
Dim A As New oIRPD
Dim WL As New oWire
Dim LedL As New oLED
Dim WC As New oWire
Dim LedC As New oLED
Dim WR As New oWire
Dim LedR As New oLED
Dim WF As New oWire
Dim LedD As New oLED
Sub Main()
A.IOLineL = 7
A.IOLineR = 6
A.IOLineS = 5
A.Operate = 1
LedL.IOLine = 29
LedL.Brightness = 7
WL.Input.Link(A.Left)
WL.Output.Link(LedL.Operate)
WL.Operate = 1
LedC.IOLine = 30
LedC.Brightness = 7
WC.Input.Link(A.Center)
WC.Output.Link(LedC.Operate)
WC.Operate = 1
LedR.IOLine = 28
LedR.Brightness = 7
WR.Input.Link(A.Right)
WR.Output.Link(LedR.Operate)
WR.Operate = 1
LedD.IOLine = 31
LedD.Brightness = 7
WF.Input.Link(A.Detected)
WF.Output.Link(LedD.Operate)
WF.Operate = 1
End Sub | // This program creates an oIRPD Object.
// It then uses 4 oWire Objects to copy
// the left, right and center property
// values to LEDs to show the results
// of the IRPD.
oIRPD A = New oIRPD;
oWire WL = New oWire;
oLED LedL = New oLED;
oWire WC = New oWire;
oLED LedC = New oLED;
oWire WR = New oWire;
oLED LedR = New oLED;
oWire WF = New oWire;
oLED LedD = New oLED;
Void Main(Void){
A.IOLineL = 7;
A.IOLineR = 6;
A.IOLineS = 5;
A.Operate = 1;
LedL.IOLine = 29;
LedL.Brightness = 7;
WL.Input.Link(A.Left);
WL.Output.Link(LedL.Operate);
WL.Operate = 1;
LedC.IOLine = 30;
LedC.Brightness = 7;
WC.Input.Link(A.Center);
WC.Output.Link(LedC.Operate);
WC.Operate = 1;
LedR.IOLine = 28;
LedR.Brightness = 7;
WR.Input.Link(A.Right);
WR.Output.Link(LedR.Operate);
WR.Operate = 1;
LedD.IOLine = 31;
LedD.Brightness = 7;
WF.Input.Link(A.Detected);
WF.Output.Link(LedD.Operate);
WF.Operate = 1;
} |
'This program creates an oIRPD Object.
'It then uses 4 oWire Objects to copy
'the left, right and center property
'values to LEDs to show the results
'of the IRPD.
Dim A As New oIRPD(7,6,5,cvOn)
Dim WL As New oWire(A.Left,,LedL.Operate,,cvOn)
Dim LedL As New oLED(29,7,,cvOff)
Dim WC As New oWire(A.Center,,LedC.Operate,,cvOn)
Dim LedC As New oLED(30,7,,cvOff)
Dim WR As New oWire(A.Right,,LedR.Operate,,cvOn)
Dim LedR As New oLED(28,7,,cvOff)
Dim WF As New oWire(A.Detected,,LedD.Operate,,cvOn)
Dim LedD As New oLED(31,7,,cvOff) |