long getPortStates()

Returns an Int64 number representing all of the port input states.

Return

An Int64 number representing all of the port input states.

Remarks

Input pins are high by default.

Examples


var GPIOdeviceInfo;				

//Flip current state of ports
function flipState() {
	setInterval(function(){ KioGPIOBoard.setPortStates(~KioGPIOBoard.getPortStates()); flipState();}, 1000 * 5);
}

function onNumatoGPIOOpened(success) {
	if(success) {
		GPIOdeviceInfo = JSON.parse(KioGPIOBoard.getDeviceInfo());
		KioWareUtils.LogInfo('Firmware Version: ' + GPIOdeviceInfo.version + 'Device Id: ' + GPIOdeviceInfo.id);
		KioGPIOBoard.setPortStates(0xf1f1f1f1);
		flipState();
	}
	else KioWareUtils.LogErr('GPIO device failed to open');
}
    

Requirements

KioWare for Android version 3.22 or greater.