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.
If an asset pushes data to an Octave-enabled device, then it is not a sensor, but rather an input.
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
- Ensure that the
enableproperty 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
Valuefor 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.
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 15 days ago