Attribute VB_Name = "X10def"
'-------------------------------------------------------------------------------
Option Explicit

' X-10 definitions.

Public Const X10_A As Byte = &H6
Public Const X10_B As Byte = &HE
Public Const X10_C As Byte = &H2
Public Const X10_D As Byte = &HA
Public Const X10_E As Byte = &H1
Public Const X10_F As Byte = &H9
Public Const X10_G As Byte = &H5
Public Const X10_H As Byte = &HD
Public Const X10_I As Byte = &H7
Public Const X10_J As Byte = &HF
Public Const X10_K As Byte = &H3
Public Const X10_L As Byte = &HB
Public Const X10_M As Byte = &H0
Public Const X10_N As Byte = &H8
Public Const X10_O As Byte = &H4
Public Const X10_P As Byte = &HC

Public Const X10_1  As Byte = &HC
Public Const X10_2  As Byte = &H1C
Public Const X10_3  As Byte = &H4
Public Const X10_4  As Byte = &H14
Public Const X10_5  As Byte = &H2
Public Const X10_6  As Byte = &H12
Public Const X10_7  As Byte = &HA
Public Const X10_8  As Byte = &H1A
Public Const X10_9  As Byte = &HE
Public Const X10_10 As Byte = &H1E
Public Const X10_11 As Byte = &H6
Public Const X10_12 As Byte = &H16
Public Const X10_13 As Byte = &H0
Public Const X10_14 As Byte = &H10
Public Const X10_15 As Byte = &H8
Public Const X10_16 As Byte = &H18

Public Const X10_AllUnitsOff As Byte = &H1
Public Const X10_AllLightsOn As Byte = &H3
Public Const X10_On As Byte = &H5
Public Const X10_Off As Byte = &H7
Public Const X10_Dim As Byte = &H9
Public Const X10_Bright As Byte = &HB
Public Const X10_AllLightsOff As Byte = &HD
Public Const X10_ExtendedCode As Byte = &HF
Public Const X10_HailRequest As Byte = &H11
Public Const X10_HailAcknowledge As Byte = &H13
Public Const X10_PreSetDim0 As Byte = &H15
Public Const X10_PreSetDim1 As Byte = &H17
Public Const X10_ExtendedData As Byte = &H19
Public Const X10_StatusOn As Byte = &H1B
Public Const X10_StatusOff As Byte = &H1D
Public Const X10_StatusRequest As Byte = &H1F
'-------------------------------------------------------------------------------
'Sub Main()
'
'' X10 example program.
'
'    Const GreenLED As Byte = 26
'    Const RedLED As Byte = 25
'
'    Do
'        Call PutPin(RedLED, 1)
'        Call X10cmd(7, 8, X10_P, X10_1, 2)
'        Call Sleep(20)
'        Call X10cmd(7, 8, X10_P, X10_On, 2)
'        Call Sleep(1024)
'
'        Call X10cmd(7, 8, X10_P, X10_Dim, 8)
'        Call Sleep(20)
'        Call X10cmd(7, 8, X10_P, X10_Bright, 8)
'        Call Sleep(1024)
'
'        Call X10cmd(7, 8, X10_P, X10_Off, 2)
'        Call PutPin(RedLED, 0)
'        Call Sleep(1024)
'    Loop
'
'End Sub
'-------------------------------------------------------------------------------
