from numato_usb_gpio.gpio import Gpio


Gpio = Gpio(numberGpios=16,port="COM49",name="USBG")


print(Gpio.ver())
print(Gpio.id_get())
Gpio.id_set("12345678")
print(Gpio.id_get())


print(Gpio.gpio_readall())
Gpio.gpio_iomask("ffff")
Gpio.gpio_iodir("0000")
Gpio.gpio_writeall("1245")
print(Gpio.gpio_readall())



for i in range(0,20):
    i=str(i).zfill(3)
    Gpio.gpio_set(i)

for i in range(0,20):
    i=str(i).zfill(3)
    print(Gpio.gpio_status(i))
        
for i in range(0,20):
    i=str(i).zfill(3)
    print(Gpio.gpio_read(i))

for i in range(0,20):
    i=str(i).zfill(3)
    Gpio.gpio_clear(i)

for i in range(0,20):
    i=str(i).zfill(3)
    print(Gpio.gpio_status(i))
    
for i in range(0,20):
    i=str(i).zfill(3)
    print(Gpio.gpio_read(i))

for i in range(0,9):
    i=str(i).zfill(3)
    print(Gpio.adc_read(i))

print(Gpio.info())
Gpio.gpio_poweron("0000","FFAB")
print(Gpio.info())

Gpio.gpio_setup([1,4,5,6,14],"OUT")
