SPL GPIO InputPort programming - Execute SPL script for application and emulator


This tutorial is continued from the previous tutorial.


3. Send emulator script to emulator
  1. Click "Send Script" button to send SPL script to emulator

 

  1. Executed result will be shown as follows.




4. Read the state of InputPort in the application
  1. Execute below script on the editor or emulator's Application command box.



      
    s = port5.Read()
    print "Current state is " + s
    
      


  2. Send SPL script for application to the emulator.



  3. Or you can execute above script on the emulator's Application tab directly.

  4. Executed result will be shown as follows.