This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from config import config | |
from machine import SPI, Pin | |
from micropython_dotstar import DotStar | |
from network import WLAN, STA_IF | |
from time import sleep, time | |
import uwebsockets.client | |
# Setup the network | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { readFileSync } = require('fs') | |
const { createServer } = require('https') | |
const { WebSocketServer } = require('ws') | |
// Brightness value the DotStar should use (should be 0.0 - 1.0) | |
const BRIGHTNESS = 0.1 | |
// Create server for WSS (listen port is set at the end of the file) | |
const server = createServer({ | |
cert: readFileSync('/etc/ssl/certs/your-domain.dev.crt'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python3 -m pip install readchar v4l2-fix | |
$ python3 control.py | |
Information: | |
-------------- | |
Focus: 240 | |
Zoom: 0 | |
Hotkeys: | |
-------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ libcamera-still --list-cameras | |
[3:04:51.771767236] [17736] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3572-e13ccdd5 | |
[3:04:51.777781516] [17737] WARN CameraSensorProperties camera_sensor_properties.cpp:163 No static properties available for 'arducam_64mp' | |
[3:04:51.777826978] [17737] WARN CameraSensorProperties camera_sensor_properties.cpp:165 Please consider updating the camera sensor properties database | |
[3:04:51.778138122] [17737] ERROR CameraSensor camera_sensor.cpp:591 'arducam_64mp 10-001a': Camera sensor does not support test pattern modes. | |
[3:04:51.808715087] [17737] WARN RPI raspberrypi.cpp:1263 Mismatch between Unicam and CamHelper for embedded data usage! | |
[3:04:51.809251321] [17737] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0 | |
[3:04:51.809469781] [17737] INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/i2c@1/arducam_64mp@1a to Unicam device /dev/media3 and ISP device /de |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add 'dtoverlay=vc4-kms-v3d,cma-512' to the '[all]' section | |
$ sudo nano /boot/config.txt | |
# Reboot to load the change | |
$ sudo reboot now | |
# Download the install script | |
$ wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh | |
# Mark the script as executable | |
$ chmod +x install_pivariety_pkgs.sh | |
# Install libcamera-dev | |
$ ./install_pivariety_pkgs.sh -p libcamera_dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# h264 | |
$ libcamera-vid -t 0 --width 1920 --height 1080 --autofocus -o - | ffmpeg -i - -f alsa -ac 1 -itsoffset 5 -i hw:1,0 -vcodec copy -acodec aac -strict -2 out.flv | |
# MJPEG | |
$ libcamera-vid -t 0 --width 1920 --height 1080 --autofocus --codec mjpeg -o - | ffmpeg -i - -f alsa -ac 1 -itsoffset 5 -i hw:1,0 -vcodec copy -acodec aac -strict -2 out.mp4 | |
# YUV420 | |
$ libcamera-vid -t 0 --width 1920 --height 1080 --autofocus --codec yuv420 -o - | ffmpeg -f rawvideo -pix_fmt yuv420p -s:v 1920x1080 -r 30 -i - -f alsa -ac 1 -itsoffset 5 -i hw:1,0 -vcodec copy -acodec aac -strict -2 out.avi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import algoliasearch from 'algoliasearch/lite'; | |
import { | |
Configure, | |
Highlight, | |
Hits, | |
useHits, // Add import here | |
Index, | |
InstantSearch, | |
SearchBox, | |
Pagination, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Extract the user-interface package | |
$ tar zxf ui_package.tgz | |
# Move the package to its final location | |
$ sudo mv dist /opt/signs-user-interface && chown -R dietpi. /opt/signs-user-interface | |
# Install the systemd services | |
$ sudo mv /opt/signs-user-interface/services/*.service /usr/lib/systemd/system/ | |
# Reload systemd so it can load the new services | |
$ sudo systemctl daemon-reload | |
# Ensure your configuration file is present (the configuration can be downloaded via the Frontend on the Device’s page) | |
$ nano /home/dietpi/.sign_config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd user-interface | |
$ yarn && yarn package | |
$ scp ui_package.tgz [email protected]:/home/dietpi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download and install NVM | |
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash | |
# Load NVM | |
$ export NVM_DIR="$HOME/.nvm" | |
$ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
$ [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" | |
# Install Node | |
$ nvm install 14.19.1 | |
# Finally, install unclutter | |
$ sudo apt install -y unclutter |
NewerOlder