from numato_usb_gpio.gpio import Gpio


Gpio = Gpio(numberGpios=32,port="COM52",name="USBG")


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


print(Gpio.gpio_readall())
Gpio.gpio_iomask("ffffffff")
Gpio.gpio_iodir("00000000")
Gpio.gpio_writeall("1245abCD")
print(Gpio.gpio_readall())



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

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

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

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

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

print(Gpio.info())
Gpio.gpio_poweron("00000000","1234567A")
print(Gpio.info())

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