The GPIO Pull Down (Low Energy) driver is used to detect the level of a digital signal on a selected pin on devices in Ultra Low Energy mode. The selected digital pin includes an internal pull-down resistor and internal button debouncing can be selected optionally.
The GPIO driver for Digital Inputs has three parameters that have to be configured:
This is the pin sensing the input, any of the GP pins is suitable for this selection if not already used for other drivers.
Pushbuttons often generate spurious open/close transitions when pressed, due to mechanical and physical issues. These transitions may be read as multiple presses in a very short period of time which can fool the program. Debouncing puts a physical delay between the readings so it insures that the button is really pressed again. Without debouncing, pressing the button once may cause an unpredictable result.
Debouncing Enabled:
The pin is debounced internally and will disregard mechanical feedback during a single button push (see: https://quantumintegrate.atlassian.net/wiki/spaces/HELP/pages/145752685/How+to+use+the+GPIO+Pull+Down+Low+Energy+driver#Debouncing-Enabled )
Debouncing Disabled:
The pin can be debounced externally with a debouncing circuit fitting the application (see: https://quantumintegrate.atlassian.net/wiki/spaces/HELP/pages/145752685/How+to+use+the+GPIO+Pull+Down+Low+Energy+driver#Debouncing-Disabled-with-External-debouncing )
The pin can just be left as is but unpredictable presses might occur (see: https://quantumintegrate.atlassian.net/wiki/spaces/HELP/pages/145752685/How+to+use+the+GPIO+Pull+Down+Low+Energy+driver#Debouncing-Disabled )
When the device is in ultra low energy mode the 3.3V rail is disabled. The pin is pulled down internally and to provide a positive level to set the pin high we select a power pin
The pin is debounced and pulled down internally
Breadboard
Schematic
Used Pins
Used Pins | Description |
---|---|
GP0 (can be any GP pin) | This pin reads the digital level and is pulled down internally |
GP1 (can be any GP pin) | This pin provides the high level |
Just like the circuit above. The button is not debounced internally as described in the parameter description
The pin is pulled down internally and debounced externally with a capacitor in parallel to the button
Breadboard
Schematic
Used Pins
Used Pins | Description |
---|---|
Any GP pin (Pin) | This pin reads the digital level and is pulled down internally |
Any GP pin (Supply Pin) | This pin provides the high level |
Navigate to the App Builder and create a new application. You can find the “Digital In” code object under the “Hardware” Tab in the object drop down menu on the left, or you can also use the search bar.
Drag the “Digital In” Object onto the canvas.
Next, locate the “Switch” Object under the “Interface” tab and drag it onto the canvas.
Finally, connect the “State” port from the Digital In Object to the “State” port on the Switch Object, and save your application.
Navigate to the Firmware Builder and create a new firmware file.
Click the “+ Add Hardware” button which will open a modal window. Scroll down in the list to find the “Generic” section and select the “Digital In” hardware option.
Give your device a name, and click “Add Device”
Next, select the “GPIO w/Pull Down Low Energy” driver under the driver dropdown menu, set the Pin, Button Debouncing, and the power pin.
For this example we select:
Pin: GP0
Debouncing: Disabled
Power Pin: GP1
You may now save your firmware file and upload it to one of your clients.
Buttons
Contact sensors
Anything providing a digital signal
Apps
Firmware
Assets