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 ellipses

Create a library with the background image

Create a style for page with the image as background
Create a style for the ellipse1 - colour gold, border white with 20px width, alignment to top-center.
Create a style for the ellipse2 - colour darkgreen, border black - colours written with hex values
Create a style for the ellipse3 - colour blue, border navy with 6px width, alignment to center-right.


Define a page named "pageName" with style "pageStyle"
Set current position to X=70px, Y=150px
Draw the ellipse (circle) with have here only one size parameter - diameter=120px
Set current position to X=240px, Y=136px
Draw the ellipse named "ellipse2" with style "drawStyle2"
Ellpse "ellipse2" has height=250px and width=100px
Draw the "ellipse3" with style "drawStyle3", the position is defined here directly in DRAW command - X=450px, Y=50px
After loading show the page named "pageName"

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

STYLE(pageStyle, Page) { image = background; }
STYLE(drawStyle1, Draw) { type = Ellipse; back = gold; col = white; width = 20; currel=TC; }
STYLE(drawStyle2, Draw) { type = Ellipse; back = \\006400; col = \\000000; width = 2; currel=CC; }
STYLE(drawStyle3, Draw) { type = Ellipse; back = blue; col = navy; width = 6; currel=CR; }

PAGE(pageName, pageStyle)
{
POSN(70, 150);
DRAW(ellipse1, 120, drawStyle1);
POSN(240, 136);
DRAW(ellipse2, 250, 100, drawStyle2);
DRAW(ellipse3, 100, 150, drawStyle3, 470, 120);
}
SHOW(pageName);