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 use pointers

Add background image to library
Add font file to library

Create page style using background image
Create text style for multi line text

Create pointer variable, create variable for which variable to load into pointer
Create text variable for English
Create text variable for French
Create text variable for German

Define a page named "pageName" with style "pageStyle"

Create text entity for pointer text

Create text for German key
Create key that loads lang variable to 2 and runs LangC
Create text for French key
Create key that loads lang variable to 1 and runs LangC
Create text for English key
Create key that loads lang variable to 0 and runs LangC

Create LangC function
Load pointer with Ln then tha lang variable
Refresh text entity with the new text pointer variable

Run LangC
After loading show the page named "pageName"

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

STYLE(pageStyle,Page) {image=background;}
STYLE(textStyle,Text) {font=asc16b;col=black;maxrows=5;justify=C;}
VAR(lnptr1>"",PTR); VAR(lang,0,U8);
VAR(ln0,"Pointer Demo\\0d\\0dPress Language\\0dTo display this text\\0din desired language",TXT);
VAR(ln1,"Pointer Démo\\0d\\0dAppuyez sur Langue\\0dPour afficher ce texte\\0ddans la langue désirée",TXT);
VAR(ln2,"Pointer Demo\\0d\\0dPresse Sprache\\0dUm diesen Text anzuzeigen\\0din der gewünschten Sprache",TXT);

PAGE(pageName, pageStyle)
{
TEXT(textln1, lnptr1, textStyle,240,110);
TEXT(But1text,"German",textStyle,100,234);
KEY(german, [LOAD(lang,2);RUN(LangC);],56,40,TOUCH,100,234);
TEXT(But2text,"French",textStyle,240,234);
KEY(french, [LOAD(lang,1);RUN(LangC);],56,40,TOUCH,240,234);
TEXT(But3text,"English",textStyle,380,234);
KEY(english,[LOAD(lang,0);RUN(LangC);],56,40,TOUCH,380,234);
}
FUNC(LangC)
{
LOAD(lnptr1>"ln",lang);
TEXT(textln1,lnptr1);;
}
RUN(LangC);
SHOW(pageName);