Tscope5
Main Page
Related Pages
Files
Examples
display01.c
////////////////////////////////////////////////////////////////////////////////
//
// __ ______
// / /_______________ ____ ___ / ____/
// / __/ ___/ ___/ __ \/ __ \/ _ \ /___ )
// / /_(__ ) /__/ /_/ / /_/ / __/ ____/ /
// \__/____/\___/\____/ .___/\___/ /_____/
// /_/
//
// display01.c
// - Open a windowed display.
// - Count back from 10 to 0.
// - Wait for a click.
////////////////////////////////////////////////////////////////////////////////
#include <tscope5.h>
#include <stdio.h>
int
main()
{
// we need to install a display first
ts5_install_display
();
int
i;
for
(i=10; i>=0; i--) {
// print something on the display
ts5_printf
(0.0, 0.0,
"%d"
, i);
// flip the display to make it visible
ts5_flip_display
();
// wait a bit
ts5_wait
(0.5);
// clear the display for the next iteration
ts5_clear_display
();
}
// wait for a click
// ts5_draw_mouse_button
// automatically flips the display
ts5_draw_mouse_button
(0.0,0.0);
return
0;
}