added LCDRows support
This commit is contained in:
@@ -2,18 +2,23 @@
|
|||||||
# UNO Monitor Sender v.0.1.0
|
# UNO Monitor Sender v.0.1.0
|
||||||
# Kidacro <kidacro@archamedis.net>
|
# Kidacro <kidacro@archamedis.net>
|
||||||
# https://kidacro.archamedis.net/git/kidacro/Arduino/src/branch/main/uno-stats-monitor
|
# https://kidacro.archamedis.net/git/kidacro/Arduino/src/branch/main/uno-stats-monitor
|
||||||
|
#
|
||||||
# monitor_sender.sh - Bash stats sender suitable for cron
|
# monitor_sender.sh - Bash stats sender suitable for cron
|
||||||
#
|
#
|
||||||
# Input Schema:
|
# Input Schema:
|
||||||
# Start char is: '#'
|
# Start char is: '#'
|
||||||
# End char is: '@'
|
# End char is: '@'
|
||||||
# 2nd char denotes which line number/mode to use
|
# 2nd char denotes which line number/mode to use
|
||||||
|
#
|
||||||
|
# Setting Schema:
|
||||||
|
# LCDLength:LCDRows:LCDDelay:LEDBrightness:LEDDelay
|
||||||
|
# 16:2:5:0:3#
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# Line 1: #1Archamedis Status@
|
# Line 1: #1Archamedis Status@
|
||||||
# Line 2: #299% free / etc.@
|
# Line 2: #299% free / etc.@
|
||||||
# LAVG -: #324@
|
# LAVG -: #324@
|
||||||
# LSET 0: #016:5:1:3@
|
# LSET 0: #016:2:5:0:3@
|
||||||
#
|
#
|
||||||
# Output Schema:
|
# Output Schema:
|
||||||
# Multimedia Controls use single characters to denote which button was pressed
|
# Multimedia Controls use single characters to denote which button was pressed
|
||||||
@@ -46,8 +51,9 @@ TTY="/dev/ttyACM0"
|
|||||||
|
|
||||||
# Arduino Settings
|
# Arduino Settings
|
||||||
LCDLength=16
|
LCDLength=16
|
||||||
LCDDelay=3
|
LCDRows=2
|
||||||
LEDBrightness=1
|
LCDDelay=5
|
||||||
|
LEDBrightness=0
|
||||||
LEDDelay=3
|
LEDDelay=3
|
||||||
##########################################################
|
##########################################################
|
||||||
|
|
||||||
@@ -76,7 +82,7 @@ SFREE=$(df -h | grep /dev/mapper/store0-lvol1 | awk '{print $4}' | paste -sd ',
|
|||||||
stty -F $TTY ispeed 9600 ospeed 9600 -ignpar cs8 -cstopb -echo -hupcl
|
stty -F $TTY ispeed 9600 ospeed 9600 -ignpar cs8 -cstopb -echo -hupcl
|
||||||
|
|
||||||
# send settings
|
# send settings
|
||||||
LINE0="#0$LCDLength:$LCDDelay:$LEDBrightness:$LEDDelay@"
|
LINE0="#0$LCDLength:$LCDRows:$LCDDelay:$LEDBrightness:$LEDDelay@"
|
||||||
/usr/bin/echo "$LINE0" > $TTY
|
/usr/bin/echo "$LINE0" > $TTY
|
||||||
echo Sending to $TTY: $LINE0
|
echo Sending to $TTY: $LINE0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user