Sub Process_Globals
Dim Sensor As PhoneSensors
End Sub
Sub Service_Create
Dim tTemp As Int =Main.tSpeed 'this is a Variable charged with values from 0 to 3
Log("tTemp Value: " & tTemp)
Sensor.Initialize2(Sensor.TYPE_ACCELEROMETER,tTemp)
End Sub
Sub Service_Start
Sensor.StartListening("sensor")
if Sensor.MaxValue=-1 Then Log("Sensor not working")
End Sub
Sub Service_Destroy
Sensor.StopListening
Log("Service stopped")
End Sub
Sub sensor_SensorChanged (Values() As Float)
Log(Values())
End Sub