Oxoscript turns into NanoPy - more infos

Log functions

logCount

  logCount(type:byte)->long

Returns the number of measured values of the selected sensor type.

count = logCount(C_ACCEL_X)

Available sensor types:

C_ACCEL_X
C_ACCEL_Y
C_ACCEL_Z

Available sensor types Oxocard-Science:

C_TEMP
C_HUMI
C_PRES
C_AMB_R
C_AMB_G
C_AMB_B
C_AMB_IR
C_AMB_LUX
C_CO2
C_IAQ
C_TVOC
C_ETOH
C_MIC_AMP
C_MIC_DEC
C_MIC_FREQ

logClear

  logClear(type:byte)

Deletes the internal file of the selected sensor type.

logClear(C_ACCEL_X)

Available sensor types:

C_ACCEL_X
C_ACCEL_Y
C_ACCEL_Z

Available sensor types Oxocard-Science:

C_TEMP
C_HUMI
C_PRES
C_AMB_R
C_AMB_G
C_AMB_B
C_AMB_IR
C_AMB_LUX
C_CO2
C_IAQ
C_TVOC
C_ETOH
C_MIC_AMP
C_MIC_DEC
C_MIC_FREQ

logRead

  logRead(type:byte, index:long)->logValue

Reads the selected sensor type value from the previously saved file at the position defined with index (0… n).

The return type is an object of type:

Example:

lv:logValue
lv = logRead(C_ACCEL_X, 0)
lv.timeStamp.getEpoch() # => 1651846738
lv.data # => -0.032959

Available sensor types:

C_ACCEL_X
C_ACCEL_Y
C_ACCEL_Z

Available sensor types Oxocard-Science:

C_TEMP
C_HUMI
C_PRES
C_AMB_R
C_AMB_G
C_AMB_B
C_AMB_IR
C_AMB_LUX
C_CO2
C_IAQ
C_TVOC
C_ETOH
C_MIC_AMP
C_MIC_DEC
C_MIC_FREQ

logData

  logData(type:byte)

Measures the selected sensor type and stores its value with a time stamp in an internal file.

logData(C_ACCEL_X)

Available sensor types:

C_ACCEL_X
C_ACCEL_Y
C_ACCEL_Z

Available sensor types Oxocard-Science:

C_TEMP
C_HUMI
C_PRES
C_AMB_R
C_AMB_G
C_AMB_B
C_AMB_IR
C_AMB_LUX
C_CO2
C_IAQ
C_TVOC
C_ETOH
C_MIC_AMP
C_MIC_DEC
C_MIC_FREQ