User Tools

Site Tools

한국어

moacon:portin:index

portIn

u8 portIn (u16 portNumber)

portNumber : The port number from which to read
returns the input state of portNumber

Reads the input state of the given port, portNumber. If the voltage on the port is less than the module's Off Level, portIn returns 0 (Off). If the voltage on the port is greater the module's On Level, portIn returns 1 (On).

u8 i = portIn(20);    // Reads the input state of port 20 and stores the result in variable i

go MOACON home

moacon/portin/index.txt · Last modified: 2016/04/14 11:07 (external edit)