SPL Button event programming - How to create SPL script for the button event


1. Add "BindGPIOButtonEvent" command
  1. Script.

      
    BindGPIOButtonEvent  
    	/Procedure_OnButtonDown:proc1
    
      
 
  1. Double click "BindGPIOButtonEvent" item on the tree.




2. Add blank procedure commands
  1. Add "procedure" and "end" commands.



      
    BindGPIOButtonEvent  
    	/Procedure_OnButtonDown:proc1
    
    procedure proc1
    
    
    
    end 
    
      



3. Add print command
  1. In order to print button's id, add print command

  2. Add "value.Button" script from the tree by double-clicking



      
    BindGPIOButtonEvent  
    	/Procedure_OnButtonDown:proc1
    
    procedure proc1
    
    	print "Button id is " + value.Button
    
    end