rpi_wordclock icon indicating copy to clipboard operation
rpi_wordclock copied to clipboard

set LED pin in config, set animation in config, sleep timer fix, ping function

Open davidsalb opened this issue 4 years ago • 1 comments

Hi,

maybe the things I've done or parts of it are useful. The contribution consists of four commits:

  • I moved the LED pin declaration into the configuration file so that others can set the wiring more flexible without code edits. (I figured since temperature sensor pin is declared in the config file, it may also be the right place for the LED pin.) Also contributed my own wiring.
  • I discoverd that the sleep timer didn't work because of two reasons: -1. In the config-file the time settings had inline comments which messed with the readout of the parameters. I changed the descriptive comments to be one line above the time-parameters. -2. The actual decision making to activate sleep mode wasn't working. I changed it and it works for me (also skipping the sleep cycle works)
  • I implemented a ping function. every minute it pings for certain devices in the local network. if a certain time (shut_off_duration) has passed without successful ping, the brightness is set to 0 to save energy. The activation of the ping_function, the IP's of the devices to be pinged and the shut_off_duration are set in the configuration file.
  • Lastly I made the animation feature optinal in config file. It can be choosen between: no_animation, typewriter, fadeOutIn.

davidsalb avatar Jul 18 '20 09:07 davidsalb

Hi @davidsalb,

thanks for opening the PR. Please take a look a the review and consider according changes.

Best, Bernd

bk1285 avatar Jul 24 '21 20:07 bk1285