Setting up the Environment
For this workshop you'll need three things: Python, libusb, and PyUSB.
Install packages for libusb and PyUSB; for example:
$ apt install libusb-dev python python-usb
Then install udev rules so we can access the board without root.
$ sudo cp 50-usb-workshop.rules /etc/udev/rules.d/ $ sudo udevadm control --reload
For now, Mac computers come with python-- so you'll only need to explicitly pull down libusb. This is easiest with Homebrew; though equivalent procedures exist for other projects (e.g. MacPorts).
Assuming you're doing things our way:
- Set up Homebrew by following their instructions.
- Install libusb by running the following command:
brew install libusb
You're all set to move on to the next tutorial!
- Head over to https://www.python.org in your favorite web browser.
- Under the Downloads menu, click the 'Python 3.7.3' button, and save the Python installer.
- Run the installer
- Click "Add Python 3.7 to PATH", then "Install Now".
- Open a command prompt or PowerShell (searching each in the Windows start menu should yield the respective program).
- Install PyUSB with
$ pip install pyusb
Installing the libusb driver for the ATtiny board
- Download Zadig.
- Run Zadig.
- Plug in your ATtiny board to a free USB port.
- The device should show up in Zadig as "Unknown Device #1" or similar. Select that device.
- Use the arrows to select
libusb-win32, and click "Install Driver".
After you program the board you'll have to repeat steps 2-5 again.