readme and some copilot fixes

This commit is contained in:
yair-mantis
2024-01-09 10:54:22 +02:00
parent cffc0931b7
commit c7b5dedcae
2 changed files with 45 additions and 55 deletions

66
readme
View File

@@ -1,43 +1,27 @@
### install
```bash
git clone git@github.com:5shekel/madpeset.git && cd madpeset
git submodule update --init --recursive
python -m venv venv
source venv/bin/activate
pip install pillow brother_ql
```
to get the camera working, you need to install the drivers for the camera. I used the [official guide](https://www.raspberrypi.org/documentation/configuration/camera.md) to install the drivers.
if you use a webcam try
```bash
sudo apt install fswebcam
```
### run
```bash
python txt.py
```
i usually add a tmux session to `~/.bashrc` to run the script on startup
test printer
```py
brother_ql -b pyusb -m QL-550 -p usb://0x04f9:0x2016 print -l 62 pefectFake.jpg --dither
```
```
byobu new-window -n 'printer' 'cd ~/printBash && bash switch.sh'
```
```
sudo systemctl daemon-reload
#to reload the systemd manager configuration.
#Run
sudo systemctl enable switch.service
#to enable the service to start at boot.
#Run
sudo systemctl start switch.service
#to start the service immediately.
```
To command the camera in the terminal I suggest to use the fswebcam package. To install:
`sudo apt install fswebcam`
To take an image with a certain resolution and hide the standard banner:
`fswebcam -r 1280x720 --no-banner /images/image1.jpg`
To find the supported webcam resolutions:
`v4l2-ctl --list-formats-ext`
You could also use ffmpeg to take images and video. To install:
`sudo apt install ffmpeg`
To take an image:
`ffmpeg -f v4l2 -video_size 1280x720 -i /dev/video0 -frames 1 out.jpg`
A more advanced alternative is mjpeg-streamer, which enables you to stream the camera in a browser. You can find a detailed tutorial how to set that up here.
```