<< Prev        Next >>

ID : 7319

ClearAccelometer

Function

To reset the cumulative sum of acceleration (including over the predetermined threshold value only) that has been applied to COBOTTA (hereafter, acceleration over the threshold value) to zero.

This command is available in Ver.2.7.* or higher.

Syntax

ClearAccelometer

Description

This command resets both the number of occurrences of acceleration over the threshold value and the maximum value of the acceleration over the threshold value to zero.

After the execution of ClearAccelometer, if GetAccelometer is executed without applying no acceleration to COBOTTA, both the number of occurrences of acceleration over threshold and the maximum value of the acceleration over the threshold value will be zero.

For about the number of occurrences of acceleration over threshold value and the maximum value of the acceleration over the threshold value, refer to GetAccelometer.

Related Terms

GetAccelometer

Attention

-

Example

'!TITLE "When acceleration over threshold value occurs three times or more, set the maximum acceleration (G) to D0."
 
Sub Main

  Do While 1
    'Reset the cumulative information of acceleration to 0.
    ClearAccelometer
	      Dim sensorValue As Variant

    Do While 1
      'Obtain the cumulative information of acceleration.
      sensorValue = GetAccelometer

      'If the acceleration over the threshold value is applied two times or more.
      If sensorValue( 0 ) > 2 Then
        'The maximum acceleration value among the applied acceleration over threshold value.
        D0 = sensorValue( 1 )

        Exit Do
      End If
    Loop
    Delay 1
  Loop
End Sub

ID : 7319

<< Prev        Next >>