picoFlamingo "Cracking Egg". Clock Demo

One of the most interesting features in the new picoFlamingo ("The Cracking Egg") is the possibility to dynamically update slides. In order to illustrate this feature we had written this clock demonstration. It looks like this:

Cracking Egg Clock DemoCracking Egg Clock Demo

As you can imagine the digital clock in the middle of the screen will update every sec. The best thing is that this demo is almost trivial using the new UPDATE_TEXT command.

This is the slide definition for this demonstration:

; -- Logo
ADD_CENTERED_IMAGE 2.0 picoflamingo_seal.png
POSITION -2.5 -2.5 -3.5
; -- Title
ADD_TEXT text06
ADD_DATA Demonstration
POSITION -1.5 -2.5 -3.5
COLOR 0.2 0.2 0.2 1.
; -- Time
ADD_TEXT text08
NAME time
ADD_DATA 10:30:01
POSITION -2.0 0.0 -3.5
SCALE 50.0
COLOR 0.8 0.8 0.8 0.9
; -- EOF

It is very easy to identify the different elements in out slide through the lines above. Look at them carefully and you will notice that "The Cracking Egg" allows us to name our slide items.
Check out the last one named time.

Now we just need to write a simple application to send the UPDATE_TEXT commands to picoFlamingo with the current time as parameter.

This is a possible implementation using Perl


while (1) {
@tm = localtime(time);
print "UPDATE_TEXT time $tm[2]:$tm[1]:$tm[0]\n";
sleep 1;

Now we just need to launch both applications using NetKitty to make the demo work:

$ nk -server T,5000 | picoflamingo --dir ui-test
$ clock.pl | nk -client T,,5000

A clock in a presentation may not be very useful.... but what about a countdown?

The picoFlamingo Team

A better implementation for the clock script could be something like this


while (1) {
@tm = localtime(time);
printf "UPDATE_TEXT time %02d:%02d:%02d\n" , $tm[2], $tm[1],$tm[0];
sleep 1;