InDashPC.org Forum Index InDashPC.org
In Dash Car PC forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

20x4 LCD..

 
Post new topic   Reply to topic    InDashPC.org Forum Index -> Software
View previous topic :: View next topic  
Author Message
barb3tta
Newbie


Joined: 02 Feb 2005
Posts: 30

PostPosted: Thu Apr 21, 2005 10:57 am    Post subject: 20x4 LCD.. Reply with quote

Hi jbors!
You know I choose pycar iso as my carpc distro Wink

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
View user's profile Send private message Visit poster's website
jbors
Site Admin


Joined: 12 Nov 2004
Posts: 1675

PostPosted: Thu Apr 21, 2005 2:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
barb3tta
Newbie


Joined: 02 Feb 2005
Posts: 30

PostPosted: Fri Apr 22, 2005 11:30 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
jbors
Site Admin


Joined: 12 Nov 2004
Posts: 1675

PostPosted: Mon Apr 25, 2005 1:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    InDashPC.org Forum Index -> Software All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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