Skip to content

Commit

Permalink
updated docker command for serial usb device passthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
npretor committed Feb 20, 2024
1 parent 321087c commit ed9f42c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ python3 app.py
```



### Camera testing
1. Start the motion server in the docker container. This connects to the motion, and initializes the camera client.
```
sudo docker run --runtime nvidia -it --rm --network=host -v /tmp/argus_socket:/tmp/argus_socket -v ~/github/circuitprinter/:/home/circuitprinter/ dustynv/opencv:r32.7.1
sudo docker run --runtime nvidia -it --rm --network=host -v /tmp/argus_socket:/tmp/argus_socket -v ~/github/circuitprinter/:/home/circuitprinter/ -v /dev/ttyACM0:/dev/ttyACM0 dustynv/opencv:r32.7.1
cd home/circuitprinter/
source venv/bin/activate
pip3 install setuptools packaging pyzmq pyserial imagezmq nanocamera
cd home/circuitprinter/src/hardware/
pip3 install setuptools packaging pyzmq pyserial imagezmq nanocamera
cd src/hardware/
python3 MotionServerZMQ.py
```
2. Run the test workflow script in another script in the container. Images should be saved to the cache folder
Expand Down
1 change: 1 addition & 0 deletions src/hardware/MotionServerZMQ.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def processCommand(self, incoming):

# Camera image saving and sending
elif "start_camera" in message:
logging.info("Motion server is starting camera")
self.camera.start_camera()
return {"res": True}

Expand Down

0 comments on commit ed9f42c

Please sign in to comment.