ownaginatious
September 19th, 2010, 03:20 AM
So here's my situation:
I recently created a 5 x 11 LED matrix with shift registers that I can control using the parallel port. Right now I'm writing a 'driver' (if you can even call it that) to write to it. The information written to it scrolls across the screen.
Anyway, the idea is that I would want this to run like a daemon when the computer starts up (just displaying the time I suppose).
What I would like to do is be able to 'feed' the program information while running. For example, if suddenly I would rather it scroll a message, I would like to be able to just somehow tell the already running program to stop displaying time, and instead display this message I'm giving it. This program would have no graphical interface.
Now the problem I'm having is, how do I talk to an already running program? Initially I thought I would just maybe make a python front-end that would kill the program and reload it with different parameters any time I want it to do something different... but I think that causes problems because then the 'lp0' hardware file I'm writing to is never closed (which seems a little unclean).
What does everyone else think/suggest? I'm relatively new to C/C++, so I don't know a lot about the flexibility of the language.
Any help/feedback would be greatly appreciated.
Thanks!
I recently created a 5 x 11 LED matrix with shift registers that I can control using the parallel port. Right now I'm writing a 'driver' (if you can even call it that) to write to it. The information written to it scrolls across the screen.
Anyway, the idea is that I would want this to run like a daemon when the computer starts up (just displaying the time I suppose).
What I would like to do is be able to 'feed' the program information while running. For example, if suddenly I would rather it scroll a message, I would like to be able to just somehow tell the already running program to stop displaying time, and instead display this message I'm giving it. This program would have no graphical interface.
Now the problem I'm having is, how do I talk to an already running program? Initially I thought I would just maybe make a python front-end that would kill the program and reload it with different parameters any time I want it to do something different... but I think that causes problems because then the 'lp0' hardware file I'm writing to is never closed (which seems a little unclean).
What does everyone else think/suggest? I'm relatively new to C/C++, so I don't know a lot about the flexibility of the language.
Any help/feedback would be greatly appreciated.
Thanks!