NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
char ReadSensorEMeter ( const byte &  port,
float &  vIn,
float &  aIn,
float &  vOut,
float &  aOut,
int &  joules,
float &  wIn,
float &  wOut 

Read the LEGO EMeter values.

Read all the LEGO EMeter register values. They must all be read at once to ensure data coherency.

portThe port to which the LEGO EMeter sensor is attached. See the Input port constants group. You may use a constant or a variable.
vInInput voltage
aInInput current
vOutOutput voltage
aOutOutput current
joulesThe number of joules stored in the EMeter
wInThe number of watts generated
wOutThe number of watts consumed
A status code indicating whether the read completed successfully or not. See CommLSReadType for possible result values.