| |
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
- Find "[GPIO Component]" item on the "MF Emulator Editor"'s command tree.
- Expand "[GPIO Component]" item and look over available methods and properties.
|
|
|
2. Add port write command
- You can write value for port by using below method.
portname.Write(bool state)
- Current SPL MF Emulator provides below 11 available GPIO ports.
Pin 0 ~ Pin 10
- 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.
- In this tutorial, we will use below port5 of Pin number 5.
id: port5, Pin number: 5
- Add script to write into GPIO port on the Emulator's editor panel.
3. Send emulator script to the emulator and read state again in the application
- Continued in the next tutorial.
|