basic demo


Thread Starter

Jiri Baum


There is now a simple light-chasing demo in the CVS.

To start:
cd demo/basic; make

To quit:
press `Q' on the keyboard

It's controlled from the keyboard (module Kbd, kbd.c): the keys L, R and Q on the keyboard toggle the three points `left', `right' and `quit'.

The Chaser module (chaser.c) is a primitive `light chasing' program. The direction of movement can be changed using the `left' and `right' points; these are notionally push-buttons, but in this demo they are controlled by
the L and R keys.

The demo terminates when the `quit' point comes on (keyboard Q).

- chaser may miss the `left' or `right' button if you press and
quickly release it, because it's badly written.
- assumes a linux terminal (hard coded escape codes).

- plctest and kbd.c should eventually be replaced by a proper curses-based HMI thing.
- `demo' itself should be done in a generic fashion, rather than by hard-coding all the modules; every program will need something to start up all the modules at the beginning and shut them all down at the end (perhaps giving them time to shut themselves down if they want to).


Jiri Baum <[email protected]>
Windows is not popular. Windows is *widespread*. Linux is popular.

LinuxPLC mailing list
[email protected]