0

I've built a complete home automation system including a LCD display (2004), an internet radio and with 433 Mhz controlling.

Unfortunatly I have a small problem with the lcd display. Everything works, it is correctly wired up and shows all text I'm sending to it. But now I want different update intervals for the four lines of the display.

You can see the problem in the video here: https://plus.google.com/u/0/photos/+AlexanderL%C3%B6hner72/albums/6048104007317163825/6048104003778025746?pid=6048104003778025746&oid=%2BAlexanderL%C3%B6hner72

The clock and the temperature in the first two lines gets updated after the forth line with the scrolling text has finished scrolling. That means the seconds of the clock are "jumping" (sorry for my bad english).

I'm doing this with a python script:

This is the original, working script that shows the problem in the video: (not allowed to post more than 2 links, so I removed this one)

And this is the script with which I'm trying to do threading and such, but that has never worked... http://pastebin.com/7rsiLC9q

The second script, which was never working is of course not finished. The part that should print the content of the pipe to stdout doesn't print anything...

And I also guess, that the whole idea wouldn't be very good, because it would be to slow... it would lag, I think..

What do you think? And how can I do it better?

Any answer would be highly appreciated

  • Okay... after some more testing (and yes, I'm an absolute python beginner and n00b and all I've done with the script was done by try&error) I've now decided to leave it as it is and works for now. That means, I've now removed the seconds from the clock and thus it doesn't matter if the clock only updates every ten or fifteen seconds. But hey, if you have some hints or answers to my problem above, they would be highly appreciated. I then would try it again... :P – Alexander Löhner Aug 16 '14 at 20:46
1

Just also update the time, while you are scrolling.

s = {"text":lcd_text, "line":4}
send_to_pipe(s)

hour = time.strftime("%H:%M:%S")
date = time.strftime("%d.%m.%Y")
s = {"text":date + " " + hour, "line":1}
send_to_pipe(s)

time.sleep(0.25)

Not the most elegant, but it should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.