Dip Switch

![]() | ![]() | ![]() | ![]() |
Dual In-line Package(DIP) Switch
- Overview
- Drivers
- Samples
- Projects
Dual In-line Package(DIP) Switch
Key features • 10 switch selector | Resources |
Function | Description |
---|---|
Read(index) | read value from switch index value: 0: Off, 1: On |
DVer() | This driver version. |
The Code!
Modules ship with this script preloaded. Use Console to reload or modify the drivers. Additionally, some languages, such as Python, include DUELink.Engine.Record()
for recording scripts directly from the host.
##### Driver Code Starts Here ###
fn Read(i)
if i > 10 || i < 1
reurn 0
end
return !dread(i, 1)
fend
fn DVer()
return 0.1
fend
##### User Code Starts Here #####
- Script
- Python
- JavaScript
Use Console to modify the default driver by adding this sample.
# Append this code at the bottom of the script, right after the driver.
# You MUST keep the driver code!!
while 1
for _i in range (1, 11)
println(Read(_i))
next
println("================")
wait(1000)
wend
from DUELink.DUELinkController import DUELinkController
import time
availablePort = DUELinkController.GetConnectionPort()
duelink = DUELinkController(availablePort)
//code
Coming soon!
Ordering Info
Description | Part Number | Price |
---|---|---|
Dip Switch | GDL-HIDIPSWITCH-B | $00.00 |