New Page 1

How To Do - Example Projects

Click on the title to open the example project
Click on the How to projects above to see the basic sample code to help you create your projects quickly and efficiently.
Each "How To" has a overall description as well as a basic line by line detail of code.
You can download the project or copy the menu file to clipboard
 
Basic Entities     Basic animation     Basic functions  
Add Image   Create button   Basic math operations
Draw colour boxes   Show page - multiple pages   Math functions
Draw colour lines   Flashing text message   Create random number
Draw colour vectors   Animation with pointers   Plus and Minus
Draw colour circles   Scroll text message   Show and format Time and Date
Draw colour ellipses   Move images (TouchX, TouchY)   Save Timestamp to text file  
Draw arcs (ellipses with angle)   Move images with buttons   Password Entry Lock  
Add multiple rows text     Move images (press button)     Menu Selection  
Use pointers   Create slider      
Text Hello World   Show and hide entities   Graphs
Create Dynamic Entities     Dial needle   Create X-Bar Graph
      PNG Transparency     Create Y-Bar Graph  
Interfaces and Hardware             Trace graph from array  
Create IO Counter           Draw sinusoid graph   
External Key             Draw graph - DNA style
Use A to D converters           Draw line graph  
Send and receive data - RS232          
Keyboard Control            
           
 

How to draw colour lines

Add background image to library
 
 Create a style for page with the image as background
 Create a line style col-white, width=20, currel=CC
 Create a line style col-lawngreen, width=5, currel=OC
 Create a line style col-gold, width=20, currel=TL
 Create a line style col-\\800000, width=20, currel=TR
 Create a line style col-white, width=15, currel=TR, opacity=50
 
 Define a page named "pageName" with style "pageStyle"
 
 Draw line1 100 pixels X & Y at position 70, 200 using drawStyle1
 Draw line2 100 pixels X & -100 Y at position 70, 200 using drawStyle2
 Draw line3 200 pixels X & 40 Y at position 240,136 using drawStyle3
 Draw line4 200 pixels X & 100 Y at position 450, 50 using drawStyle4
 Draw line5 200 pixels X & 180 Y at position 450, 50 using drawStyle5
 
 After loading show the page named "pageName"

LIB(background,"SDHC/bground.png");

STYLE(pageStyle, Page) { image = background; }
STYLE(drawStyle1, Draw) { type = Line; col = white; width = 20; currel=CC; }
STYLE(drawStyle2, Draw) { type = Line; col = lawngreen; width = 5; currel=OC; }
STYLE(drawStyle3, Draw) { type = Line; col = gold; width = 30; currel=TL; }
STYLE(drawStyle4, Draw) { type = Line; col = \\800000; width = 15; currel=TR; }
STYLE(drawStyle5, Draw) { type = Line; col = Blue; width = 15; currel=TR; opacity=50; }

PAGE(pageName, pageStyle)
{
POSN(70, 200);
DRAW(line1, 100, 100, drawStyle1);
DRAW(line2, 100,-100, 30, drawStyle2);
POSN(240, 136);
DRAW(line3, 200, 40, drawStyle3);
DRAW(line4, 200, 100, drawStyle4, 450, 50);
DRAW(line5, 200, 180, drawStyle5, 450, 50);
}
SHOW(pageName);