| View previous topic :: View next topic |
| Author |
Message |
barb3tta Newbie
Joined: 02 Feb 2005 Posts: 30
|
Posted: Thu Apr 21, 2005 10:57 am Post subject: 20x4 LCD.. |
|
|
Hi jbors!
You know I choose pycar iso as my carpc distro
Now I wanna add support for my 20x4 LCD for displaying some info like song author and title, playing time...
But I don't know where to start!
I found pyLCD, a wrapper for lcdproc, and I'll use it to make work easier...
The problem is add code to yours...
Can you tell me where is the "place" to insert the code?
I know you used a graphical LCD, do you think I can modify the file ks0108.py placed in the "render" directory?
I'm new to python, sorry!
bye |
|
| Back to top |
|
 |
jbors Site Admin

Joined: 12 Nov 2004 Posts: 1675
|
Posted: Thu Apr 21, 2005 2:25 pm Post subject: |
|
|
The pycar is working fine with graphical displays. This way render directory contains renderers for graphical info. If you want to display text info, it needs to be a standalone plugin/module which listens for audio/video player changes and renders them. I can do a module for you which will be able to call executables with text parameters.
Can lcdproc accept parameters like this or what's the interface it has ? |
|
| Back to top |
|
 |
barb3tta Newbie
Joined: 02 Feb 2005 Posts: 30
|
Posted: Fri Apr 22, 2005 11:30 am Post subject: |
|
|
| jbors wrote: | The pycar is working fine with graphical displays. This way render directory contains renderers for graphical info. If you want to display text info, it needs to be a standalone plugin/module which listens for audio/video player changes and renders them. I can do a module for you which will be able to call executables with text parameters.
Can lcdproc accept parameters like this or what's the interface it has ? |
I didn't do anything with lcdproc yet, but I know it is a deamon (LCDd) that listen to port 13666.
Pylcd ( http://www.schwarzvogel.de/software-pylcd.shtml ) is a wrapper that lets you control LCDd in python. It is simply a script that telnets the 13666 port and send the appropriate messages.
from pylcd-test.py:
| Code: |
import sys,pylcd,os
p=pylcd.client()
print "Connect message:", p.connect()
print "Info as know by the module:"
p.getinfo()
(sysname, nodename, release, version, machine)=os.uname()
s="s"
w1="w1"
w2="w2"
w3="w3"
p.screen_add(s)
p.widget_add(s,w1,"string")
p.widget_add(s,w2,"string")
p.widget_add(s,w3,"string")
p.widget_set(s,w1,"1 1 'Hello, LCD world!'")
print "printing 'Hello, LCD world!'"
p.widget_set(s,w2,"1 2 '%s: %s'"%(nodename, release))
print "printing '%s: %s'"%(nodename, release)
p.widget_set(s,w3,"1 3 'äöüß'")
print "printing 'äöüß'"
|
I only need to connect to LCDd, add a screen and some windget during initialization and simply send the appropriate string with widget_set...
Obviously I need to install LCDd and configure it properly!
bye |
|
| Back to top |
|
 |
jbors Site Admin

Joined: 12 Nov 2004 Posts: 1675
|
Posted: Mon Apr 25, 2005 1:11 pm Post subject: |
|
|
The interface of lcdproc is little criptic.
I'll go ahead with the plugin skeleton which you may fill up with more details. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|