novice81
Posts: 10
Joined: Mon Feb 05, 2018 8:36 pm

alter the shutdown and reboot sequence to shutdown the lcd

Mon Feb 05, 2018 8:44 pm

ve been trying to find a way to make it so when we reboot and/or shutdown (using a command not a button) the raspberry pi the lcd goes off with it instead of turning off when i pull the power

pcmanbob
Posts: 7060
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: alter the shutdown and reboot sequence to shutdown the lcd

Tue Feb 06, 2018 10:23 am

Hi.

Which LCD are you talking about ? 7" LCD screen ,16x2 LCD some small LCD connected to the gpio.

Which ever it may be they will all receive power from the pi or its PSU shutting down the pi does not turn off the power ( like it does in a desktop pc )
to remove the power you have to disconnect the pi from the PSU either by unplugging it or via a switch in the PSU cable.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

novice81
Posts: 10
Joined: Mon Feb 05, 2018 8:36 pm

Re: alter the shutdown and reboot sequence to shutdown the lcd

Wed Feb 07, 2018 6:26 pm

the 16x2 lcd. so your saying theres no way i can put some code sequence to make the screen shutoff when i tell it to shutdown or reboot
and then tun back on when i plug it in

pcmanbob
Posts: 7060
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: alter the shutdown and reboot sequence to shutdown the lcd

Wed Feb 07, 2018 8:55 pm

You could turn off the back light on your 16x2 LCD but that's all, because as I said it's still powered from the pi until the power is removed from the pi. The pi does not turn off or disconnect from the power it's self you have to do it externally by pulling the power cord out or fitting a switch in the power cord.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
rados-dataplicity
Posts: 40
Joined: Wed Aug 03, 2016 11:56 am
Location: UK
Contact: Website Facebook Twitter

Re: alter the shutdown and reboot sequence to shutdown the lcd

Fri Feb 09, 2018 4:56 pm

If you can control your LCD programatically then you could add a script to turn it off from within systemd. If you'd put the script in the location below:

Code: Select all

/lib/systemd/system-shutdown/
Then systemd would turn it off at the very end of the shutdown sequence. ;)
I tinker around with Raspberry Pis daily and make sure that people can easily access theirs remotely.

Community outreach @ dataplicity.com

novice81
Posts: 10
Joined: Mon Feb 05, 2018 8:36 pm

Re: alter the shutdown and reboot sequence to shutdown the lcd

Mon Feb 12, 2018 6:10 pm

thank you, would the /lib/ command work to access the reboot area too?

User avatar
rados-dataplicity
Posts: 40
Joined: Wed Aug 03, 2016 11:56 am
Location: UK
Contact: Website Facebook Twitter

Re: alter the shutdown and reboot sequence to shutdown the lcd

Tue Feb 13, 2018 11:16 am

Yes it would
I tinker around with Raspberry Pis daily and make sure that people can easily access theirs remotely.

Community outreach @ dataplicity.com

Return to “Python”