Add files via upload
This commit is contained in:
parent
64c6352265
commit
35131ba393
90 changed files with 1738 additions and 0 deletions
11
Examples/Sensors/accelerometer.bas
Normal file
11
Examples/Sensors/accelerometer.bas
Normal file
|
@ -0,0 +1,11 @@
|
|||
SUB MAIN
|
||||
IF (IsAccelerometerAvailable()) THEN
|
||||
WHILE (TRUE)
|
||||
PRINT "--"
|
||||
PRINT "X=" + STRING(getAccelerometerX()) + ", Y=" + STRING(getAccelerometerY()) + ", Z=" + STRING(getAccelerometerZ())
|
||||
SLEEP 1000
|
||||
END WHILE
|
||||
ELSE
|
||||
PRINT "Accelerometer Sensor is not available on this device"
|
||||
END IF
|
||||
END SUB
|
10
Examples/Sensors/ambienttemperature.bas
Normal file
10
Examples/Sensors/ambienttemperature.bas
Normal file
|
@ -0,0 +1,10 @@
|
|||
SUB MAIN
|
||||
IF (IsAmbientTemperatureAvailable()) THEN
|
||||
WHILE (TRUE)
|
||||
PRINT getAmbientTemperature()
|
||||
SLEEP 1000
|
||||
END WHILE
|
||||
ELSE
|
||||
PRINT "Ambient Temperature Sensor is not available on this device"
|
||||
END IF
|
||||
END SUB
|
10
Examples/Sensors/gravity.bas
Normal file
10
Examples/Sensors/gravity.bas
Normal file
|
@ -0,0 +1,10 @@
|
|||
SUB MAIN
|
||||
IF (IsGravityAvailable()) THEN
|
||||
WHILE (TRUE)
|
||||
PRINT "X=" + STRING(getGravityX()) + ", Y=" + STRING(getGravityY()) + ", Z=" + STRING(getGravityZ())
|
||||
SLEEP 1000
|
||||
END WHILE
|
||||
ELSE
|
||||
PRINT "Gravity Sensor is not available on this device"
|
||||
END IF
|
||||
END SUB
|
10
Examples/Sensors/gyroscope.bas
Normal file
10
Examples/Sensors/gyroscope.bas
Normal file
|
@ -0,0 +1,10 @@
|
|||
SUB MAIN
|
||||
IF (IsGyroscopeAvailable()) THEN
|
||||
WHILE (TRUE)
|
||||
PRINT "X=" + STRING(getGyroscopeX()) + ", Y=" + STRING(getGyroscopeY()) + ", Z=" + STRING(getGyroscopeZ())
|
||||
SLEEP 1000
|
||||
END WHILE
|
||||
ELSE
|
||||
PRINT "Gyroscope Sensor is not available on this device"
|
||||
END IF
|
||||
END SUB
|
10
Examples/Sensors/light.bas
Normal file
10
Examples/Sensors/light.bas
Normal file
|
@ -0,0 +1,10 @@
|
|||
SUB MAIN
|
||||
IF (IsLightAvailable()) THEN
|
||||
WHILE (TRUE)
|
||||
PRINT getLight()
|
||||
SLEEP 1000
|
||||
END WHILE
|
||||
ELSE
|
||||
PRINT "Light Sensor is not available on this device"
|
||||
END IF
|
||||
END SUB
|
10
Examples/Sensors/linearacceleration.bas
Normal file
10
Examples/Sensors/linearacceleration.bas
Normal file
|
@ -0,0 +1,10 @@
|
|||
SUB MAIN
|
||||
IF (IsLinearAccelerationAvailable()) THEN
|
||||
WHILE (TRUE)
|
||||
PRINT "X=" + STRING(getLinearAccelerationX()) + ", Y=" + STRING(getLinearAccelerationY()) + ", Z=" + STRING(getLinearAccelerationZ())
|
||||
SLEEP 1000
|
||||
END WHILE
|
||||
ELSE
|
||||
PRINT "Linear Acceleration Sensor is not available on this device"
|
||||
END IF
|
||||
END SUB
|
10
Examples/Sensors/magneticfield.bas
Normal file
10
Examples/Sensors/magneticfield.bas
Normal file
|
@ -0,0 +1,10 @@
|
|||
SUB MAIN
|
||||
IF (IsMagneticFieldAvailable()) THEN
|
||||
WHILE (TRUE)
|
||||
PRINT "X=" + STRING(getMagneticFieldX()) + ", Y=" + STRING(getMagneticFieldY()) + ", Z=" + STRING(getMagneticFieldZ())
|
||||
SLEEP 1000
|
||||
END WHILE
|
||||
ELSE
|
||||
PRINT "Magnetic Field Sensor is not available on this device"
|
||||
END IF
|
||||
END SUB
|
10
Examples/Sensors/pressure.bas
Normal file
10
Examples/Sensors/pressure.bas
Normal file
|
@ -0,0 +1,10 @@
|
|||
SUB MAIN
|
||||
IF (IsPressureAvailable()) THEN
|
||||
WHILE (TRUE)
|
||||
PRINT getPressure()
|
||||
SLEEP 1000
|
||||
END WHILE
|
||||
ELSE
|
||||
PRINT "Pressure Sensor is not available on this device"
|
||||
END IF
|
||||
END SUB
|
10
Examples/Sensors/proximity.bas
Normal file
10
Examples/Sensors/proximity.bas
Normal file
|
@ -0,0 +1,10 @@
|
|||
SUB MAIN
|
||||
IF (IsProximityAvailable()) THEN
|
||||
WHILE (TRUE)
|
||||
PRINT getProximity()
|
||||
SLEEP 1000
|
||||
END WHILE
|
||||
ELSE
|
||||
PRINT "Proximity Sensor is not available on this device"
|
||||
END IF
|
||||
END SUB
|
10
Examples/Sensors/relativehumidity.bas
Normal file
10
Examples/Sensors/relativehumidity.bas
Normal file
|
@ -0,0 +1,10 @@
|
|||
SUB MAIN
|
||||
IF (IsRelativeHumidityAvailable()) THEN
|
||||
WHILE (TRUE)
|
||||
PRINT getRelativeHumidity()
|
||||
SLEEP 1000
|
||||
END WHILE
|
||||
ELSE
|
||||
PRINT "Relative Humidity Sensor is not available on this device"
|
||||
END IF
|
||||
END SUB
|
10
Examples/Sensors/rotationvector.bas
Normal file
10
Examples/Sensors/rotationvector.bas
Normal file
|
@ -0,0 +1,10 @@
|
|||
SUB MAIN
|
||||
IF (IsRotationVectorAvailable()) THEN
|
||||
WHILE (TRUE)
|
||||
PRINT "X=" + STRING(getRotationVectorX()) + ", Y=" + STRING(getRotationVectorY()) + ", Z=" + STRING(getRotationVectorZ())
|
||||
SLEEP 1000
|
||||
END WHILE
|
||||
ELSE
|
||||
PRINT "Rotation Vector Sensor is not available on this device"
|
||||
END IF
|
||||
END SUB
|
10
Examples/Sensors/temperature.bas
Normal file
10
Examples/Sensors/temperature.bas
Normal file
|
@ -0,0 +1,10 @@
|
|||
SUB MAIN
|
||||
IF (IsTemperatureAvailable()) THEN
|
||||
WHILE (TRUE)
|
||||
PRINT getTemperature()
|
||||
SLEEP 1000
|
||||
END WHILE
|
||||
ELSE
|
||||
PRINT "Temperature Sensor is not available on this device"
|
||||
END IF
|
||||
END SUB
|
Loading…
Add table
Add a link
Reference in a new issue