(MRWD) Sensors Lesson

Sensors

Sensors are used to gather real world data around us and turn that into useful information. Mobile devices have sensors that measure motion, orientation, and various environmental conditions. For instance, games might track a user's gestures and motions, such as tilt, shake, rotation or swing. Other apps use sensory data such as temperature and steps taken. Travel apps might use geomagnetic field sensor and accelerometer to report compass directions or locations.

sensor components UI:
Sensors
AccelerometerSensor
BarcodeScanner
Clock
GyroscopeSensor
LocationSensor
NearField
OrientationSensor
Pedometer
Proximity SensorMost phone have the following sensors:

  • Accelerometer
  • Gyroscope
  • Digital Compass
  • Ambient Light Sensor
  • Proximity Sensor
  • Temperature Sensor
  • Sound
  • Pedometer
  • Fingerprint Sensors
  • Heart Rate Monitors
  • Barometer
  • IR Blaster Sensor

Go to the Sensor Components in App Inventor website by clicking on the link in the sidebar to learn more about the sensors in app inventor.   Afterwards, go through the learning object to review.

Some of the sensors do not work with the emulator. You need to export the app to an Android device to properly use the sensor features.

Download the Accelerometer, Clock, Gyroscope and Pedometer pdfs from the sidebar. Each one demonstrates how to get data using each of those Sensor components. Be familiar with the process.  

[CC BY 4.0] UNLESS OTHERWISE NOTED | IMAGES: LICENSED AND USED ACCORDING TO TERMS OF SUBSCRIPTION