Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

ePaper control for Lightning Shield

Usage

install

git clone https://github.com/nayuta-ueno/lnshield_tools.git
cd lnshield_tools
python3 install -r requirements.txt

init

python3 gpio_init.py

display message

python3 epaper.py "" "hello" "world" "" "I'm Umbrel!"

LED

python3 gpio.py 1 0
python3 gpio.py - 1

Example

  1. login Umbrel using terminal app
  2. install and setup
mkdir lnshield
cd lnshield
git clone https://github.com/nayuta-ueno/lnshield_tools.git
cd lnshield_tools
python3 install -r requirements.txt
python3 gpio_init.py
cd
  1. copy "$HOME/umbrel/bin/bitcoin-cli" to "$HOME/umbrel/bin/bitcoin-cli2" and
cat $HOME/umbrel/bin/bitcoin-cli | sed -e 's/exec/exec -T/' > $HOME/umbrel/bin/bitcoin-cli2 ; chmod u+x $HOME/umbrel/bin/bitcoin-cli2
  1. create $HOME/watch_block.sh and edit
#!/bin/bash

before=0
while :
do
  count=`$HOME/umbrel/bin/bitcoin-cli2 getblockcount | sed -e 's/\r//g' -e 's/\n//g'`
  if [ "$before" != "$count" ]; then
    dt=`date +'%Y/%m/%d'`
    tm=`date +'%T'`
    tmp_cpu=`vcgencmd measure_temp`
    python3 $HOME/lnshield/lnshield_tools/epaper.py "" "$count" "$dt" "$tm" "$tmp_cpu"
    before=$count
  fi
  sleep 180
done
  1. chmod
chmod u+x watch_block.sh
  1. run script file
nohup ./watch_block.sh &> /dev/null < /dev/null&

References

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages