Oxoscript se transforme en NanoPy - plus d'infos

Fonctions de log

logCount

  logCount(type:byte)->long

Renvoie le nombre de valeurs de mesure du type de capteur sélectionné.

count = logCount(C_ACCEL_X)

Types de capteurs disponibles:

C_ACCEL_X
C_ACCEL_Y
C_ACCEL_Z

Types de capteurs disponibles 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)

Supprime le fichier interne du type de capteur sélectionné.

logClear(C_ACCEL_X)

Types de capteurs disponibles:

C_ACCEL_X
C_ACCEL_Y
C_ACCEL_Z

Types de capteurs disponibles 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

Lit la valeur du type de capteur sélectionné dans le fichier précédemment enregistré à la position définie par index (0… n).

Le type de retour est un objet de type:

Exemple:

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

Types de capteurs disponibles:

C_ACCEL_X
C_ACCEL_Y
C_ACCEL_Z

Types de capteurs disponibles 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)

Mesure le type de capteur sélectionné et enregistre sa valeur avec un horodatage dans un fichier interne.

logData(C_ACCEL_X)

Types de capteurs disponibles:

C_ACCEL_X
C_ACCEL_Y
C_ACCEL_Z

Types de capteurs disponibles 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