fbpx
Magicblocks Lesson 12: Mobile App 01
Magicblocks App Lesson 1

Getting Started

An introduction to the app and it's sensors

About

 

This app is used to send sensor values obtained from the sensors in your phone to a specific MQTT client. It is important to note that although there are many sensors in the app there should be specific sensors in your phone.
The type of sensors in your phone varies from the brand and version of your phone. It is important to first identify the sensors inbuilt in your phone first.

Getting Started

 

To get started, go to the app and click settings (Upper Left-hand corner). Enter the necessary details in the given spaces. If you want to publish data to a specific MQTT broker, enter the hostname and the port of it. It is also important to specify the publishing and subscribe topic. There are other options that you can try out according to your needs. When operating this app, the phone should have a stable internet connection at all times.

Sensors

 

QR/Bar Code Scanner

Scans a QR code with your camera and send the data. It is important to give the app access to your camera.

The format the data is sent- {“qr”:{“format”:”QR_CODE”,”content”:””}}

Accelerometer

An accelerometer is an electromechanical sensor used to measure acceleration forces. Units – X-axis ,Y-axis, Z-axis values measured in m/s2

The format the data is sent- {“accelerometer”:{“x”:”2.84″,”y”:”0.44″,”z”:”10.02″}}

Gyroscope

Gyro sensors, also known as angular rate sensors or angular velocity sensors, are devices that sense angular velocity.

Units — X-axis ,Y-axis, Z-axis values measured in rad/s

The format the data is sent- {“gyroscope”:{“x”:”0.0″,”y”:”0.0″,”z”:”0.0″}}

Proximity Sensor

A proximity sensor is a non-contact sensor that detects the presence of an object (often referred to as the “target”) when the target enters the sensor’s field.

Units — distance measured in cm

The format the data is sent- {“proximity”:{“x”:”5.0″}}

Light

This sensor gives the brightness of the area

Units in lx

The format the data is sent- {{“light”:{“illuminance”:”7.0″}}

Temperature

Provides the temperature in the room.

Units in Celsius

The format the data is sent- {“temperature”:{“temperature”:”7.0″}}

Pressure

Measures the room pressure

Units in hPa

The format the data is sent- {“pressure”:{“pressure”:”1009.56″}}

Location

Give access to the app to access location. It gives the latitude and longitude location of the device in degrees, and also the altitude of the current location in meters.

The format the data is sent- {“gps”:{“alt”:”0.0″,”lon”:”80.06″,”lat”:”6.72″}}

Related Posts
Leave a Reply