Sensor Resources
This topic provides information about Sensor Resources and how to work with them.
Sensors gather data about some physical phenomenon (e.g., light, temperature, etc.) and convert that data into analog or digital signals. For example, the mangOH Red has a built-in light sensor that reports the current level of brightness.
Octave automatically creates Resources for the built-in sensors on Octave edge devices. You will configure these Resources in Octave any time you want to poll these sensors' data in Octave.
Note
If an asset pushes data to an Octave-enabled device, then it is not a sensor, but rather an input.
Configuring a Sensor
Follow the steps below to configure the Resource for a mangOH Red's on-board light sensor. Using these steps, you will enable the sensor and set its polling period which specifies the frequency at which the sensor reports data to the Data Hub:
- Navigate to Build > Device > Resources.
- Locate and expand
redSensor/light
. - Ensure that the
enable
property is set to true. - Click the edit button to the right of the period property.
- Set the value to 5 and click Set. This sets the resource polling period to 5 seconds.
- Click Apply when prompted.
- Wait for 5 seconds to elapse and check that the Value column for the Resource has updated.
- Place your finger over the light sensor which is located as shown here:
- Observe the
Value
for the sensor on the Build > Device > Resources screen. After the polling period has elapsed, the value should drop significantly due to the lack of light.
Note
You see this update on the Resources screen in the Octave Dashboard because the device is in Developer Mode.
In Developer Mode, the device periodically updates all of its last-known values for every Resource, regardless of whether they are set to be observed or not. Note that in Developer Mode, the Resources screen is updated approximately every 20 seconds and not in real time.
Updated almost 4 years ago