PiGRRL Zero Plus with Backlight Control
Description
This Is A Pigrrl Zero With Brightness Control. * This Is A Purely Software Remix Of The Pigrrl Zero Plus. Please Ignore Any Model Files Attached To This Project. * This Remix Has **No Sound** Here Is A Demo Of How It Looks: <Iframe Width="560" Height="315" Src="Https://Www.Youtube.Com/Embed/Zdfqekstglk" Frameborder="0" Allowfullscreen></Iframe> The Four Brightness Settings I Went With Were: Full: 1023/1023 Half: 500/1023 20 Percent: 200/1023 5 Percent: 50/1023 They Seem To Closely Resemble Ds Lite Brightness Settings, Which I Was Generally Happy With. I Wrote A Gist For The Python Script That Controls Brightness: Https://Gist.Github.Com/Lindsaylandry/F30Cc0740Bc20461Edf79F7C452Dcc39 Place This File In `/Usr/Local/Bin/Backlight.Py` Next, I Created A Systemd Service That Will Call This Script Upon System Startup. Write The Following Code To `/Etc/Systemd/System/Backlight.Service` Https://Gist.Github.Com/Lindsaylandry/B975615A43F82F80E433A400808D2Daa Finally, Enable This Service. `Sudo Systemctl Enable Backlight.Service` This Service Doesn'T Properly Start Unless The Gpio Pins Have Been Properly Reassigned. The Gpio Responsible For Backlight Control On A Pitft, #18, Is By Default Mapped To The Left Key. I Had To Reassign The Left Key To Gpio 4, Both By Soldering And Adjusting Some Software. The Following Instructions Are For Reassigning Gpio Pins If You Haven'T Done So Already. To Reassign Pins, Rewrite The Following Line Of `/Home/Pi/Adafruit-Retrogame/Retrogame.C` `{ 18, Key_Left }, // Left` Becomes `{ 4, Key_Left }, // Left` Also Comment Out Any Reference To Gpio 27 If It Exists. `//{ 27, Key_4 }, // Tft 27` Recompile With The Following Command: `Make Retrogame` Replace The Current Retrogame Executable (Stop Retrogame Process Before Doing This) `Sudo Cp /Usr/Local/Bin/Retrogame /Usr/Local/Bin/Retrogame-Bak #First Backup Original Executable` `Sudo Cp /Home/Pi/Adafruit-Retrogame/Retrogame /Usr/Local/Bin/Retrogame` Finally, Restart The Pigrrl. Backlight Service Should Be Up And Running! **Important Note:** The Original Build Has Gpio 18 Used As A Sound Amplifier Because It Is A Pwm. I Couldn'T Figure Out To Have Both Sound And Backlight Control, So This Build Functions With No Sound. Sorry Folks! D: If Someone Could Figure Out How To Have Sound Work Too That Would Be Awesome. Hit Me Back If You Have Any Questions About This, And Happy Hacking!
Statistics
Likes
26
Downloads
0