Skip to content

Elixir library to automatically dim the Raspberry Pi touch screen

Notifications You must be signed in to change notification settings

hez/elixir-backlight-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BacklightAutomation

An automatic screen dimmer for the Raspberry Pi 7" touch screen.

Installation

def deps do
  [
    {:backlight_automation, github: "hez/elixir-backlight-automation", tag: "v0.1.2"}
  ]
end

Usage

Add the server to your application start up.

children = [
  # ....
  {BacklightAutomation, [active_level: 100, inactive_level: 30, dim_interval: 60]}
]

You can also manual trigger level changes, but the server will override your changes on next check. Instead change the active_level or inactive_level.

iex> BacklightAutomation.inactive_level(25)
:ok
iex> BacklightAutomation.active_level(90)
:ok

The interval for going inactive can also be changed, it takes a number of seconds before dimming the screen:

iex> BacklightAutomation.dim_interval(90)

About

Elixir library to automatically dim the Raspberry Pi touch screen

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages