PropWare  3.0.0.229
C++ objects and CMake build system for Parallax Propeller
07 Box and Lines.c
1 /*
2  Box and Lines.c
3  Box and line functions have parameters of xi, yi, xf, yf, color.
4  Valid x ranges are 0 to 127, and valid y ranges are 0 to 63. These
5  pixel counts are measured from the top-left. The color is just one
6  bit, with 1 indicating white and 0 black. Pixel counts are measured
7  from the top-left.
8 */
9 
10 #include "simpletools.h" // Include simpletools library
11 #include "badgetools.h" // Include badgetools library
12 
13 int x, y;
14 
15 void main() // Main function
16 {
17  badge_setup(); // Call badge setup
18  box(32, 16, 96, 48, 1); // box (32, 16)...(96, 48)
19  line(32, 16, 96, 48, 1); // Line diagonal in box
20  pause(500); // Wait 1/2 s
21  line(32, 48, 96, 16, 1); // Other diagonal
22 }
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
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
x
int x
Definition: 07 Box and Lines.c:13
badgetools.h
This library provides convenient functions for a variety of Parallax eBadge operations.
line
void line(int x0, int y0, int x1, int y1, int c)
Plot a line on the oLED screen.
box
void box(int x0, int y0, int x1, int y1, int c)
Plot a box on the oLED screen.