![]() #relay 8 on s = board.write('x80') time.sleep(2) #relays 1 and 2 on s = board.write('x03') time.sleep(2) #all relays off s = board.write('x00') time.sleep(2) board.close()except Exception as e: print ('Unable to get the BitMode of the device.') print (e) board. ZK-MT21S 2.1 Channel Bluetooth 5. ![]() ![]() Multifunction Pulse Counter Switch Adjustable Timer Delay Turn On/Off Relay Module DC 5V 12V 24V 0 review. Please post how to 'tBitMode(0xFF,0x4)' via pyserial, so I can remove ftd2xx dependencyTested on: python3.4, Win 10Packages: pip install ftd2xxcode:import ftd2xximport sysimport osimport timeos.system('cls')dev = Nonetry: dev = ftd2xx.listDevices() if (None != dev): print ('FTD2xx device available.') else: print('No FTD2xx devices available, please check that its plugged in.')except: print ('No FTD2xx devices available, please check that its plugged in.') exit()try: board = ftd2xx.open(dev = 0 ) print ('Connection to FTD2xx successful!')except: print ('Something went wrong trying to open communication with the FTD2xx device.') exit()try: m = board.getBitMode() tBitMode(0xFF,0x4) board.resetDevice() m = board.getBitMode() #all relays off s = board.write('x00') time.sleep(2) #relay 1 on s = board.write('x01') time.sleep(2) #relay 2 on s = board.write('x02') time.sleep(2) #relay 3 on s = board.write('x04') time.sleep(2) #relay 4 on s = board.write('x08') time.sleep(2) #. Relay 5V 8 Channel Relay Module ESP32 Wireless Development Board WIFI Bluetooth With Optocoupler Isolation For Arduino 0 review.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |