switch off baclight 7 inch touchscreen

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Pauls
Posts: 28
Joined: Sunday 19 June 2016 9:06
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

switch off baclight 7 inch touchscreen

Post by Pauls »

Hi,

I have a 7 inch touchscreen in combination with an RPI v3 as a domoticz controller.
All works ok, but i am looking for a solution to switch the screen backlight off by a button in dashticz.
Tapping the screen should switch to backlight on.
Is it possible to create such functionality ?

Greetings,

Paul.
Pauls
Posts: 28
Joined: Sunday 19 June 2016 9:06
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: switch off baclight 7 inch touchscreen

Post by Pauls »

Well, lets reply on my own question....
I have made a software button which starts a bash script that switch the backlight on:
#!/bin/sh
echo 0 > /sys/class/backlight/rpi_backlight/bl_power

and off:
#!/bin/sh
echo 1 > /sys/class/backlight/rpi_backlight/bl_power

Because I have a master and slave RPI, the button status is send from the master back to the slave (the one with the 7"screen) in which the script is run.
It works ok, but when the screen is dark, it is a bit difficult to find the exact place for the button to switch the screen back on.
I wonder if there is a way to use the entire screen as a switch function to start the script?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest