boolean getPortState(int)
Gets the input state of the specified pin.
Parameters
Name | Description |
portInd |
int The index of the pin. |
Return
The input state at the specified pin.
Remarks
If portInd is an output pin, it will be converted to an input.
Examples
function readPort() {
if (!KioGPIOBoard.isOpen()) return;
var readInd = document.getElementById('readInd');
var readRes = document.getElementById('readRes');
readRes.innerHTML = KioGPIOBoard.getPortState(parseInt(readInd.value));
}
Requirements
KioWare for Android version 3.22 or greater.