Turning the monitor on
This was an easy one too, made a file called startup.sh in /storage with the following content
#!/bin/sh
cleanup()
{
echo ${RPI_SCREEN} > /sys/class/gpio/unexport
echo ${RPI_STATUS} > /sys/class/gpio/unexport
}
RPI_STATUS=27
RPI_SCREEN=22
echo ${RPI_SCREEN} > /sys/class/gpio/export
echo ${RPI_STATUS} > /sys/class/gpio/export
echo "in" > /sys/class/gpio/gpio${RPI_STATUS}/direction
echo "out" > /sys/class/gpio/gpio${RPI_SCREEN}/direction
echo "1" > /sys/class/gpio/gpio${RPI_SCREEN}/value
sleep 3
echo "in" > /sys/class/gpio/gpio${RPI_SCREEN}/direction
trap 'cleanup; exit' SIGHUP SIGINT SIGTERM SIGQUIT
cleanup
Right now I am not doing anything with the screen status pin, I will probably change that laterand in autostart.sh add:
/storage/startup.sh &
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.