| |
SPL Button event programming - How to create SPL script for the button event
1. Add "BindGPIOButtonEvent" command
- Script.
| |
BindGPIOButtonEvent
/Procedure_OnButtonDown:proc1
| |
|
|
|
|
- Double click "BindGPIOButtonEvent" item on the tree.
2. Add blank procedure commands
- Add "procedure" and "end" commands.
| |
BindGPIOButtonEvent
/Procedure_OnButtonDown:proc1
procedure proc1
end
| |
|
3. Add print command
- In order to print button's id, add print command
- Add "value.Button" script from the tree by double-clicking
| |
BindGPIOButtonEvent
/Procedure_OnButtonDown:proc1
procedure proc1
print "Button id is " + value.Button
end
| |
|
|