cd ~/projects
mkdir laserdock
cd laserdock
- Made a virtualenv manually:
virtualenv venv --python=/blehblehbleh
- activated it via
source venv/bin/activate
pip install -r requirements.txt
- found out I don't have libusb, so I homebrew installed it
brew install libusb
- Make a RPi Lite Burn
- Enable for SSH
- SSH into device
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git screen python3-pip libopenjp2-7 libtiff5
- Authorize your computer with GitHub
- create an ssh key on your machine by typing
ssh-keygen -t rsa
; accept the defaults by keep hitting enter. - print out the ssh key by typing cat ~/.ssh/id_rsa.pub
- copy key to your clipboard.
- copy/paste public key into your github settings here: https://github.com/settings/keys
- type in your GitHub password
- create an ssh key on your machine by typing
git clone [email protected]:dlernstrom/laserdock_python.git -o upstream
cd laserdock_python
sudo pip3 install -r requirements.txt
sudo apt-get install libusb-dev
screen -R
Reattaches if possible, otherwise restartssudo python3 border_parser.py
Got this weird error once: Traceback (most recent call last): File "halloween_2019.py", line 62, in dock.burn_sample(sample) File "/home/pi/laserdock_python/laserdock/laser_dock.py", line 260, in burn_sample self.potentially_send_samples() File "/home/pi/laserdock_python/laserdock/laser_dock.py", line 253, in potentially_send_samples self.send_samples() File "/home/pi/laserdock_python/laserdock/laser_dock.py", line 240, in send_samples self.write_bulk(msg) File "/home/pi/laserdock_python/laserdock/laser_dock.py", line 97, in write_bulk self.dev[0][(1, 0)][0].write(msg) File "/usr/local/lib/python3.7/dist-packages/usb/core.py", line 387, in write return self.device.write(self, data, timeout) File "/usr/local/lib/python3.7/dist-packages/usb/core.py", line 948, in write self.__get_timeout(timeout) File "/usr/local/lib/python3.7/dist-packages/usb/backend/libusb1.py", line 855, in iso_write handler = _IsoTransferHandler(dev_handle, ep, data, timeout) File "/usr/local/lib/python3.7/dist-packages/usb/backend/libusb1.py", line 664, in init self.__set_packets_length(length, packet_length) File "/usr/local/lib/python3.7/dist-packages/usb/backend/libusb1.py", line 689, in __set_packets_length _lib.libusb_set_iso_packet_lengths(self.transfer, packet_length) File "/usr/local/lib/python3.7/dist-packages/usb/backend/libusb1.py", line 499, in libusb_set_iso_packet_lengths for iso_packet_desc in _get_iso_packet_list(transfer): File "/usr/local/lib/python3.7/dist-packages/usb/backend/libusb1.py", line 268, in _get_iso_packet_list list_type = _libusb_iso_packet_descriptor * transfer.num_iso_packets ValueError: Array length must be >= 0, not -5