From 95cc4501ec61d4c0a527d96a32ee30943718f22f Mon Sep 17 00:00:00 2001 From: CaCO3 Date: Sat, 15 Mar 2025 22:28:53 +0100 Subject: [PATCH] . --- README.md | 2 +- docs/Demo-Mode.md | 33 +++++++++++++++++---------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 194ddfb..7195fb6 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ To test it locally: 1. Install the required tools (See also [.github/workflows/build-docs.yaml](.github/workflows/build-docs.yaml)): ``` pip install --upgrade pip - pip install mkdocs mkdocs-gen-files mkdocs-awesome-pages-plugin mkdocs-material pymdown-extensions mkdocs-enumerate-headings-plugin mkdocs-redirects-plugin + pip install mkdocs mkdocs-gen-files mkdocs-awesome-pages-plugin mkdocs-material pymdown-extensions mkdocs-enumerate-headings-plugin ``` 1. In the main folder of the repo, call `mkdocs serve` (and keep it running). This will locally generate the documentation. diff --git a/docs/Demo-Mode.md b/docs/Demo-Mode.md index 8d58a33..e8e486d 100644 --- a/docs/Demo-Mode.md +++ b/docs/Demo-Mode.md @@ -34,12 +34,12 @@ There are several ways to collect images from your device: 1. Use the Webhook to send the raw image on each round to a dedicated server, see [Webhook](../Webhook) resp. [../Parameter `UploadImg`](Parameters/#parameter-uploadimg). 1. Another option is to pull the images periodically from `http:///img_tmp/raw.jpg`. Eg. with an external service. Below is a (Linux)-Bash script to do it: - ```bash + ```Bash #!/bin/bash while [[ true ]]; do echo "fetching value..." wget -q http://192.168.1.151/value -O value.txt - + value=`cat value.txt` echo "Value: $value" @@ -47,23 +47,24 @@ There are several ways to collect images from your device: changed=$? #echo "Diff: $diff" - if [[ $changed -ne 0 ]]; then - echo "Value changed:" - echo $diff - echo "fetching image..." - wget -q http://192.168.1.151/img_tmp/raw.jpg -O $value.jpg - else - echo "Value did not change, skipping image fetching!" - fi + if [[ $changed -ne 0 ]]; then + echo "Value changed:" + echo $diff + echo "fetching image..." + wget -q http://192.168.1.151/img_tmp/raw.jpg -O $value.jpg + else + echo "Value did not change, skipping image fetching!" + fi - cp value.txt value_previous.txt + cp value.txt value_previous.txt - echo "waiting 60s..." - sleep 60 - done - ``` + echo "waiting 60s..." + sleep 60 + done + ``` + ## Use prepared images -See the selection below with prepared images. +Instead of recoding your own images, you can use one of the selections of prepared images below. ## How does it work The Demo Mode tries to interfere as less as possible with the normal behavior. Whenever a Cam framebuffer gets taken (`esp_camera_fb_get()`), it replaces the framebuffer with the image from the SD card.