You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
348 B
18 lines
348 B
7 years ago
|
#!/bin/env python3
|
||
|
import time
|
||
|
|
||
|
import gex
|
||
|
|
||
|
with gex.DongleAdapter(gex.TrxRawUSB(remote=True), 0x10) as transport:
|
||
|
|
||
|
# connect GEX client library to the remote slave
|
||
|
client = gex.Client(transport)
|
||
|
|
||
|
adc = gex.ADC(client, "adc")
|
||
|
|
||
|
print(adc.read_smooth())
|
||
|
|
||
|
print(adc.read_raw())
|
||
|
|
||
|
# this will fail unless the communication works
|