IoT Expansion Cards Digital Outputs
This topic describes how to physically connect a digital output to an IoT expansion board.
Now that you've decided to connect to your IoT Expansion board via GPIO, you'll need to:
- Take a look at the IoT Expansion Board pin map and decide which pin you'll use.
- Wire up the pin.
- Configure the pin via the GPIO Service in Octave.
This tutorial describes how to configure and set the value of an output pin on an IoT Expansion Board installed in a mangOH Red, and verify that voltage has been set.
Note
For this tutorial you will need a multimeter.
Locating the Appropriate Pin Map
Review the IoT Expansion Board pin map and identify the output pin you would like to use.
Configuring a Digit Output
The subsections below describe how to add, configure, and verify a GPIO output on your IoT Expansion Board.
Adding a GPIO Output
Follow the steps below to configure a digital output pin:
- Navigate to Device > Services, locate the GPIO section, and click Configure.
- Locate the Add pin section.
- Click the Pin drop down and select a GPIO pin (e.g. IOT0_GPIO4). Note the expected voltage indicated for the pin which will 1800mV.
- (Optional) Change the name in Resource to a more descriptive name.
- Set the Direction to Output.
- Click Add. The configured output pin appears in the list of GPIO Services.
Setting the Output Value
Follow the steps below to set the value for the digital output pin:
- Navigate to Device > Resources.
- Locate and expand io.
- Locate and expand the resource corresponding to the output pin configured in the previous section (e.g.
IOT0_GPIO4/
). - Click the Configured value column for the enable property and set the property to enabled.
The GPIO pin should now be producing a voltage of 1800mV.
Testing the Output
Follow the steps below to verify that the GPIO pin is outputting voltage.
- Configure your multimeter to measure voltage levels up to 1.8 VDC.
- Place the ground probe of the multimeter onto a GPIO ground pin (e.g. Pin 38).
- Place the positive probe of the multimeter onto the GPIO output pin configured in the previous sections.
- Verify that the voltage from the GPIO pin matches that defined for the resource (1.8V).
Updated over 4 years ago