Skip to main content
Version: legacy

Common

api.ledControl(state)

Turns ON or OFF the on board LED. It can be also used for debugging purposes.

api.randInt(min, max)

Generate random number within given range.

api.getBatteryVoltage()

Get curent battery voltage in mV.

api.dumpArray(str)

Prints contents of variable as hexadecimal string (dumps array into console)

api.float(op,form,arg1,arg2)

Performs operation with given floating point data.

Only if it's allowed by the firmware.

api.setVar(index, value)

Saves a persistent variable value, can be used between different wake up iterations.

api.getVar(index)

Returns persistent variable value, can be used between different wake up iterations.