Difference: ANameDisplay (3 vs. 4)

Revision 42017-10-26 - uli

Line: 1 to 1
 
META TOPICPARENT name="TheUCCOpenDay"

Name display

Line: 12 to 12
  The demonstration is based on an exercises on the HD44780
Added:
>
>
After the Open Day the students told me that some visitors have asked why we cannot display names longer than 16 characters. It should be possible to show these names in a round robbing fashion. I answered, saying that this was entirely possible but would make the program substantially more complex.

To prove that my answer was right I tried to write this program, improvedNameDisplay and I attach the code to this page. The program uses pthreads to separate the round robbing task from the task waiting for new user input. In addition I must use non-blocking input from stdin (the terminal) to make sure that the program is not stuck waiting for user input but can do its task for the round robbing.

I tried the mechanisms first (creating and deleting a thread and the non-blocking I/O and I left these test programs in the archive for you to inspect. Finally I tried the round robbing display on the PC (I had no access to the Raspberry Pi during the weekend).

The resulting code is interesting because the Makefile finds out through the SESSION environment on which system it is running and configures the C code through #define VARIABLES which are passed to the code though the -DVARIABLE compilation option.

 -- Uli Raich - 2017-10-06

Comments

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback