void setPortStates(int64 portStates)
Toggles the on/off or high/low state of all ports/pins, each represented by one bit
Security
Trust Level Required: Full Trust
Parameters
Name | Description |
portStates |
int64 The new port/pin states, where each bit is either 0 = off/low or 1 = on/high |
Return
Nothing returned
Examples
var pin = 3;
KioGPIOBoard.setPortIOStates(0); // Set all pins as outputs
KioGPIOBoard.setPortStates(1 << (pin - 1)); // Sets pin 3 to the high state, and all others to the low state
console.log(KioGPIOBoard.getPortStates()); // Logs the current states
Requirements
KioWare OS (Linux®) version 1.0 or greater.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.