PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Examples
Badge
01 Display
04 Screen Auto ON OFF.c
1
/*
2
Screen Auto ON OFF.c
3
Turn automatic screen update off to make multiple updates to the screen
4
buffer before allowing the changes to appear. The screen_update function
5
can be used to manually update when changes are ready.
6
*/
7
8
#include "
simpletools.h
"
// Include simpletools library
9
#include "
badgetools.h
"
// Include badgetools library
10
11
void
main
()
// Main function
12
{
13
badge_setup
();
// Call badge setup
14
for
(
int
n = 0; n < 8; n++)
// Count 0 to 8
15
{
16
oledprint
(
"%d"
, n);
// Update with each number
17
pause
(200);
// Pause 1/5 s
18
}
19
screen_auto
(
OFF
);
// Disable screen auto-update
20
cursor
(0, 1);
// Position cursor
21
22
// Changes in this loop don't appear
23
// until the screen_update call.
24
for
(
int
n =
'a'
; n <=
'h'
; n++)
// Count from a to h
25
{
26
oledprint
(
"%c"
, n);
// Print the character
27
pause
(200);
// Wait 1/5 s
28
}
29
screen_update
();
// Make changes appear
30
}
pause
void pause(int time)
Delay cog from moving on to the next statement for a certain length of time.
Definition:
libws2812.c:125
cursor
void cursor(int col, int row)
Position the cursor to a certain column and row for printing text on the oLED display....
Definition:
oled_cursor.c:7
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
main
int main(void)
Definition:
GraphicsTest.c:20
oledprint
int oledprint(const char *fmt,...)
Use to display strings on the oLED display in a manner similar to displaying combinations of strings ...
Definition:
peb_text.c:4
badge_setup
int badge_setup(void)
Set up all available badge drivers. Call this function at the start of any given program to allow acc...
Definition:
badgealpha.c:29
screen_auto
void screen_auto(int state)
Cause function calls like oledprint, point, and others to appear immediately after the function is ca...
Definition:
oled_auto.c:7
badgetools.h
This library provides convenient functions for a variety of Parallax eBadge operations.
screen_update
int screen_update(void)
Manually update the screen image after. Typically used after multiple oLED function calls after scree...
Definition:
oled_asmfast.c:426
OFF
#define OFF
OFF can be used in place of zero to enabled parameters in functions like drive_feedback and drive_tri...
Definition:
abdrive.h:204
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17