Move imports to after connection, add service files to pi
parent
dbde062909
commit
052ea30f73
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=UDP Camera Stream
|
||||||
|
After=network.target auditd.service media-writable.mount
|
||||||
|
Requires=media-writable.mount
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/media/writable/run.sh
|
||||||
|
Restart=always
|
||||||
|
Type=idle
|
||||||
|
User=pi
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -0,0 +1,15 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Python Sorting Client
|
||||||
|
After=network.target auditd.service media-writable.mount
|
||||||
|
Requires=media-writable.mount
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/media/writable/item-sort/pi_client.py
|
||||||
|
Restart=always
|
||||||
|
Type=idle
|
||||||
|
User=root
|
||||||
|
StartLimitIntervalSec=0
|
||||||
|
RestartSec=5
|
||||||
|
WorkingDirectory=/media/writable/item-sort
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -1,7 +1,7 @@
|
|||||||
import board
|
import board
|
||||||
import neopixel
|
import neopixel
|
||||||
pixels = neopixel.NeoPixel(board.D18, 24)
|
pixels = neopixel.NeoPixel(board.D18, 23)
|
||||||
def ledOff():
|
def ledOff():
|
||||||
pixels.fill((0,0,0))
|
pixels.fill((0,0,0))
|
||||||
def ledOn():
|
def ledOn():
|
||||||
pixels.fill((40,40,40))
|
pixels.fill((2,2,2))
|
||||||
|
Loading…
Reference in New Issue