PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Examples
Badge
01 Display
06 Display Invert.c
1
/*
2
Display Invert.c
3
Makes white pixels black and vice-versa.
4
*/
5
6
#include "
simpletools.h
"
// Include simpletools library
7
#include "
badgetools.h
"
// Include badgetools library
8
9
void
main
()
// Main function
10
{
11
badge_setup
();
// Call badge setup
12
while
(1)
// Main loop
13
{
14
oledprint
(
" True "
);
// True (black background)
15
pause
(2000);
// Wait 2 s
16
clear
();
// Clear the screen
17
invert
(1);
// Set invert
18
oledprint
(
"Inverted"
);
// Display w/ white background
19
pause
(2000);
// Wait 2 s
20
clear
();
// Clear again
21
invert
(0);
// Back to true
22
}
23
}
24
25
invert
void invert(int i)
Invert (or not) the pixel colors in the display. Use invert(0) for white pixels on a black background...
Definition:
oled_invert.c:7
clear
int clear(void)
Clear the display.
Definition:
oled_clear.c:7
pause
void pause(int time)
Delay cog from moving on to the next statement for a certain length of time.
Definition:
libws2812.c:125
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
badgetools.h
This library provides convenient functions for a variety of Parallax eBadge operations.
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17