UPDATE05.07.2015- Fixed problems with buttons; MPD was closing connection after 60 seconds of inactivity -> fixed with pinging MPD every 50 seconds
- Added dynamic backlight control: don't know if it will be useful for somebody, but I had problems due to display lightning up my room so I wasn't able to sleep
now the backlight will go off when you stop or pause playback, after specified time, you can enable/disable this and specify the time between pause/stop and going off
HOW TO UPDATE FROM LATEST VERSION BEFORE THISTo update to this version from latest before this, you only have to get the newest RA_LCD_Buttons.py. You can do this with GUI (if you have Samba enabled or another app like WinSCP, links are here:
TAR Archive:
http://buzzthisnow.com/RA_LCD_Buttons.tar (TAR archive)
RAR Archive:
http://buzzthisnow.com/RA_LCD_Buttons.rar (RAR archive)
Or you can do it in terminal (via SSH). First, remove the old one. Position yourself where your RA_LCD_Buttons folder is and remove it with:
- Code: Select all
rm RA_LCD_Buttons
Then get a new one:
- Code: Select all
wget http://buzzthisnow.com/RA_LCD_Buttons.tar
And then use this command to extract it:
- Code: Select all
tar -xvf RA_LCD_Buttons.tar
Now you can delete the archive if you want, to free up some space, by executing:
- Code: Select all
rm RA_LCD_Buttons.tar
It will create a folder named RA_LCD_Buttons, execute this command to enter it:
- Code: Select all
cd RA_LCD_Buttons
Now you can start it with:
- Code: Select all
nohup python2 RA_LCD_Buttons.py >/dev/null 2>&1 &
HARDWARE MODIFICATION FOR BACKLIGHTIf you want to use this feature for dynamic LCD backlight, a hardware modification is needed. You will need a BD139 transistor and a 10 kilo ohm resistor. Or if you know what you're doing, you can use any other suitable transistor-resistor combination. I used this one. The schematic is attached in this post. Then in RA_LCD_Buttons.py you have to change
LCD_BACKLIGHT pin according to where you connected it and you have to specify
backlight_timeout. If you put it to 0, it will be disabled.
COMMENTSI'm currently struggling with PWM. This thing with backlight is just a beggining, I'm working on creating a dimmable backlight: you would be able to adjust backlight brightness with your remote, and also turn it off with a key press instead of this automatic turn off when paused/stopped.