GandalfTheOneWire
New Member
I have an old hobby board 6 port hub (DS2409) that has been running for 10 years extracting data with a little VB.net APP.
I want to increase the 1 wire network and will need a new Hub.
But I don’t want to spend money on the hub if I can’t program it in VB.net!
So before I take the plunge would anyone know what the equivalent VB (or C#) code would be for this old code?
Or is it even possible?
Thanks for any help
Dim oSwitch As com.dalsemi.onewire.container.OneWireContainer1F
oSwitch = CType(oOneWireAdapter.getDeviceContainer("xxxxxxxxxxxxxxx"), com.dalsemi.onewire.container.OneWireContainer1F)
Dim oDevice As SByte()
With oSwitch
For iSwitchNo As Integer = 0 To 1
oDevice = .readDevice
.setLatchState(iSwitchNo, True, False, oDevice)
.writeDevice(oDevice)
'
'.... Get data here .....
'
.setLatchState(iSwitchNo, False, False, oDevice)
.writeDevice(oDevice)
Next
End With
I want to increase the 1 wire network and will need a new Hub.
But I don’t want to spend money on the hub if I can’t program it in VB.net!
So before I take the plunge would anyone know what the equivalent VB (or C#) code would be for this old code?
Or is it even possible?
Thanks for any help
Dim oSwitch As com.dalsemi.onewire.container.OneWireContainer1F
oSwitch = CType(oOneWireAdapter.getDeviceContainer("xxxxxxxxxxxxxxx"), com.dalsemi.onewire.container.OneWireContainer1F)
Dim oDevice As SByte()
With oSwitch
For iSwitchNo As Integer = 0 To 1
oDevice = .readDevice
.setLatchState(iSwitchNo, True, False, oDevice)
.writeDevice(oDevice)
'
'.... Get data here .....
'
.setLatchState(iSwitchNo, False, False, oDevice)
.writeDevice(oDevice)
Next
End With