- Reinstall Python and check the box in the installer to add python.exe to the PATH variable. This is the only option in the installer that's not defaulted to yes, so I hadn't checked it the first time I installed. I'm sure there's an easier way of getting this added if you already have Python, but uninstalling and starting over was quick and easy (and makes sure you have an updated copy of Python).
- Open the Windows command prompt (run cmd.exe) and type "python -m pip install pyusb" to install pyusb automatically. This was an adventure in itself for me just working out how to install Python modules...
- Download libusb-win32 to get a very useful utility called inf-wizard.exe, which shows up in the bin folder after extracting.
- Plug in the FF32 and let Windows do its automatic installation stuff - it's a generic HID so it's quick and easy
- Run inf-wizard as administrator (recent versions of Windows have become a real pain trying to save users from themselves...). Pick the FF32 from the list of devices. Write down the two hex values for Vendor ID and Product ID. Keep clicking through to create a .inf file and save it somewhere. On the last screen click Install Now. If it doesn't install successfully, you probably didn't run as administrator.
- Use the Python examples from Flyfish as a reference only and don't even try to run them with Windows, they have to be entirely rewritten to work with pyusb. Sometime soon I'll get around to doing that and post them.
- Write your script like this to get pyusb to work with the FF32. This is just a very quick example that I got working - there's lots to do to package the functions up nicely. Note the use of the Vendor and Product IDs that we wrote down earlier:
EDIT 7/31/2015: here's my library and an example application: https://github.com/tterev3/ff32
This comment has been removed by a blog administrator.
ReplyDelete