SPL GPIO InputPort programming - Prepare emulator script to change the state of input port


1. Look over available methods and properties under the "[GPIO Component]" on the Emulator's command tree
  1. Find "[GPIO Component]" item on the "MF Emulator Editor"'s command tree.

  2. Expand "[GPIO Component]" item and look over available methods and properties.

 



2. Add port write command
  1. You can write value for port by using below method.

       portname.Write(bool state)

  2. Current SPL MF Emulator provides below 11 available GPIO ports.

       Pin 0 ~ Pin 10

  3. You can access these ports by using its id (portname) instead of Pin number. These id are listed on the log when you run SPL MF Emulator.



  4. In this tutorial, we will use below port5 of Pin number 5.

       id: port5,    Pin number: 5

  5. Add script to write into GPIO port on the Emulator's editor panel.



      
    port5.Write(true)
    
      



3. Send emulator script to the emulator and read state again in the application
  1. Continued in the next tutorial.