Steps
1. Open Sample_App_Source/GPIOTestTool/windows-iot-bus-tools.sln in Visual Studio.
2. Change
Solution configuration
to
Release
and
Solution platform
to
x64
.
3. Under the
Build
menu, select
Build Solution
.
Execute the GPIO sample application
About this task
The EGW-3200 Windows image includes pre-installed sample application binaries.
Steps
1. Open the command prompt in administrator mode.
2. Change to the following directory:
C:\Program Files\Dell\EGW3200 Software tools\Application
Binaries
3. Use the following commands to execute the GPIO sample application:
a. To open the pin connection:
> GpioTestTool.exe <pin>
b. To set the drive mode to output:
> setdrivemode output
c. To set the DO0 pin to low:
> write 0
d. To set the DO0 pin to high:
> write 1
Similarly, the pin can be opened and set to drive mode input and the current value can be read using a
read
command.
Use the
help
command for detailed usage.
Digital Input/Output Function from PCA9535 GPIO
Users can opt to connect a PCA9535 GPIO expander module to one of the I2C buses of the EGW-3200.
PCA9535 GPIO Expander API
The PCA9535 GPIO module’s API library files and a demo program (including source code) are included in the board support
package for the EGW-3200.
PCA9535Init
This funcrtion is used to initialize the directions of the GPIO pins. Also, it opens the handle to the I2C bus and it is necessary to
call this function before executing any of the other APIs.
int PCA9535Init (unsigned int i2cnumber)
Parameters
i2cnumber
—The I2C bus number to which the PCA9535 board is connected. Can be 0 or 1.
Return codes
0 if the initialization is successful.
30
Setting Up the Windows 10 Operating System