LCD display and buttons in Python (tutorial and code)

Raspberry Pi related support

Re: LCD display and buttons in Python (tutorial and code)

Postby jeroenrood » 26 Jun 2017, 20:55

Okay,
It looks like it's working now.
The problem was the assignment of the Volume Down button to pin 12. (= I2S BitClock on RP3 )
After assigning it to pin 16 the music continues to play.

Jeroen.
jeroenrood
 
Posts: 15
Joined: 06 Nov 2015, 14:45

Re: LCD display and buttons in Python (tutorial and code)

Postby bretta200 » 29 Aug 2017, 21:04

I followed s.k.'s method on page 12 and I easily had a working 20 x 4 LCD

However after a few days all the display will show is the track that was playing prior to the previous shutdown and is totally unresponsive.
I deleted the LCD folder and rune lcd service file, rebooted a couple of times then repeated the installation procedure but still stuck with just the previous shutdown track displayed.

Any guesses as to whats happened ?? its as though the command Restart=always in rune_lcd.service isnt restarting.
I guess a fresh install of Rune is the only way to get back to a woking system ?

## EDIT ##
I changed "RestartSec=1" to "RestartSec=5" in /usr/lib/systemd/system/rune_lcd.service and it seems to be behaving once again :D
bretta200
 
Posts: 10
Joined: 30 Apr 2017, 17:43

Re: LCD display and buttons in Python (tutorial and code)

Postby Pushok62 » 13 Sep 2017, 23:03

Hi!
I have Raspberry Pi 3 Model B with RuneAudio 0.4 beta 20160321.
My working version is the parallel LCD connection: https://github.com/lukazgur/RuneAudioLCDMod.
Everything is OK, but after changing and applaying of the MPD settings information on the display isn't updated, required restart of a RuneAudio. At the same time buttons and IR work normally. In what can be a problem (possibly the display client is disconnected by MPD, so how automatically to restart it after MPD updating)?
Pushok62
 
Posts: 2
Joined: 13 Sep 2017, 22:56

Re: LCD display and buttons in Python (tutorial and code)

Postby avior » 27 Dec 2017, 12:48

hi
i am newbie but manage to get LCD to work on my raspberry pi 3 but can not figure out how to auto start the LCD at the moment i have to do
cd RuneAudioLCD-master

python2 start.py

manually can someone please show me how to do in easy simple steps

thanks
avior
 
Posts: 2
Joined: 27 Dec 2017, 12:30

Re: LCD display and buttons in Python (tutorial and code)

Postby hondagx35 » 27 Dec 2017, 14:03

Hi avior,

search the forum with "python service".

Make shure your python script is executeable:
Code: Select all
chmod +x start.py


You have to create a startup service like “rune_lcd.service” in /usr/lib/systemd/system/
Type in the following command:
nano /usr/lib/systemd/system/rune_lcd.service
with:
Code: Select all
[Unit]
Description=RuneAudio LC-Display
After=mpd.service

[Service]
ExecStart=/usr/bin/python2 /root/start.py
TimeoutSec=0
Restart=always
RestartSec=1
StartLimitInterval=30
StartLimitBurst=20

[Install]
WantedBy=multi-user.target


Next enable the new service :
Code: Select all
systemctl enable rune_lcd.service


and reboot


Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: LCD display and buttons in Python (tutorial and code)

Postby avior » 28 Dec 2017, 09:51

Thanks Frank for Your Reply
After many try i Finally got it to work with your help on auto startup

Thank you so much :D :D :D
avior
 
Posts: 2
Joined: 27 Dec 2017, 12:30

Re: LCD display and buttons in Python (tutorial and code)

Postby parthabhatta » 21 Jan 2018, 16:39

I am new to Runeaudio although I am using XBMC KODI (openelec etc) since 2014. I use a 16x2 LCD in I2C mode in my setup which is RPi3 with ALLO BOSS HAT. The LCD runs well in Libreelec in I2C mode and I wish to run the same in RuneAudio too.
I got to this thread read it from start to finish but is confused regarding the installation procedure. The first post although has elaborate tutorial yet it's meant for LCD in 4Bit mode. There are ways to get LCD running in I2C mode throughout the thread which I observe. But it's too confusing.
So, while thanking the OP and other contributors for this project I would like to request them to please put put a comprehensive guide for noibs like us especially for running LCD in I2C mode.
Regards
parthabhatta
 
Posts: 8
Joined: 18 Jan 2018, 17:12

Re: LCD display and buttons in Python (tutorial and code)

Postby Apache » 07 Apr 2018, 15:51

Thank you Rune team for the great job. I also followed s.k.'s method on page 12 and now I have a working RPi + PIFI Digi DAC+ 20 x 4 LCD and buttons. I add one standalone Arduino to control Raspberry , don't use serial communication but opto-coupler to act like buttons and I do this to isolate SBC from the microcontroller and also to change the buttons with rotary encoders . I disable remote control on raspberry and will add a remote for arduino to control the same opto-couplers and finish this with a pass band filter . Please excuse my bad english.
PS: looking forward to change PiFi DAC with Allo Kali Reclocker + AKM AK4495EQ ( if somebody can help me to setup this please send me a message )
Attachments
DAC02.jpg
DAC02.jpg (244.63 KiB) Viewed 2561 times
DAC01.jpg
DAC01.jpg (161.5 KiB) Viewed 2561 times
Apache
 
Posts: 3
Joined: 26 Mar 2017, 18:28

Re: LCD display and buttons in Python (tutorial and code)

Postby Roberto63 » 28 Mar 2019, 15:30

Hi everyone, there is some good soul among you who would like to adjust the tutorial to be able to install the i2c display with 4 wires and the various steps with all the dependencies, that in following it, get lost ... Between Python 2 - Python 3 Adafruit libraries .. etc .. etc ..
Thank you .
Roberto63
 
Posts: 2
Joined: 22 Feb 2019, 21:47

Re: LCD display and buttons in Python (tutorial and code)

Postby Roberto63 » 04 Apr 2019, 18:29

Hello everyone
I tried again to re-write the Rune image and reinstall everything following the post 67 on page 12 but I couldn't see anything on the display.
I then tried to install Python2 again and I get this:

Image

probably not properly installed python 2.
Is this the cause? What can I do?
Thank you.

this is my Debug Data: https://pastebin.com/ET9adgjZ
Roberto63
 
Posts: 2
Joined: 22 Feb 2019, 21:47

support RuneAudio Donate with PayPal

PreviousNext

Return to Raspberry Pi

Who is online

Users browsing this forum: Google [Bot] and 7 guests
cron