I have the following code
the code writes only 1 line in the text file. How can i make it write accelerometer values as they are shown in the labels? i want to capture x,y,z values as they change. i have tried looping using do while but it doesn't work
B4X:
Sub Accelerometer_AccelerometerChanged (X As Float, Y As Float, Z As Float)
Dim Ax As Float
Dim Ay As Float
Dim Az As Float
Ax=X
Ay=Y
Az=Z
xval.Text=Ax
yval.Text=Ay
zval.Text=Az
File.WriteString(File.DirRootExternal, "myaccval.txt", xval.Text&","&yval.Text&","&zval.Text)
End Sub
the code writes only 1 line in the text file. How can i make it write accelerometer values as they are shown in the labels? i want to capture x,y,z values as they change. i have tried looping using do while but it doesn't work