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 do flashing text message

Add background image to library

Create a style for page with the image as background
Create a style for the text col-red using Ascii32 font curRel=CC

Create a variable for action
Create and load timer that runs for 400ms forever.
Create an intreupt on the Timer that runs flashF function.

Define a page named "pageName" with style "pageStyle"
Position the text entity at 240,136

Create flashF function
 Check status of varAction variable
if variable = 0 Hide text
if variable = 1 change style col and then show text
if variable = 2 Hide text
if variable = 3 change style col and then show text
if variable = 4 Hide text
if variable = 5 change style col and show text, reset variable to 0
if variable does not = 5 then increment varAction

After loading show the page named "pageName"

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

STYLE(pageStyle, Page){image=background;}
STYLE(textStyle, Text){font=Ascii32;col=Red;curRel=CC;}
VAR(varAction,0,U8);
LOAD(TIMER0,400,0);
INT(intName,TIMER0,flashF);

PAGE(pageName, pageStyle)
{
POSN(240, 136);
TEXT(Text1,"FLASHING TEXT MESSAGE",textStyle);
}
FUNC(flashF)
{
IF(varAction=0?[HIDE(Text1);;]);
IF(varAction=1?[LOAD(textStyle.col,indigo);SHOW(Text1);;]);
IF(varAction=2?[HIDE(Text1);;]);
IF(varAction=3?[LOAD(textStyle.col,Blue);SHOW(Text1);;]);
IF(varAction=4?[HIDE(Text1);;]);
IF(varAction=5?[LOAD(textStyle.col,Red);SHOW(Text1);; LOAD(varAction,0);]:[CALC(varAction,varAction,1,"+");]);
}
SHOW(pageName);