![]() ![]() Relay_ft245r uses the PyUSB Python module to control USB devices. Windows, the libusb-win32 driver to be installed and configured. Just put it in the sameĭirectory as the Python program that will call it.īut it does need PyUSB and, for Linux, a udev rule to be added or There's no need to "install" relay_ft245r.py. serial_number )) # Connect and turn on relay 2 and 4, and turn off rb. serial_number ) # Pick the first one for simplicity dev = dev_list print ( 'Using device with serial number ' + str ( dev. ![]() exit () # Show their serial numbers for dev in dev_list : print ( dev. list_dev () # list of FT245R devices are returned if len ( dev_list ) = 0 : print ( 'No FT245R devices found' ) sys. How to use relay_ft245rĮxample code: import relay_ft245r import sys import time rb = relay_ft245r. A popular example is the Sainsmart USB relay board. Relay_ft245r is a Python module to control relay boards based on theįTDI FT245R chip. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |