5) View It!
You will use the XBee Zigbee Cloud Kit’s web application to configure a widget for viewing the light readings from your sensor: https://xbeegateway.herokuapp.com/#/login
- Log in to the XBee Zigbee Cloud Kit web application.
- Use the Add Widget button to create a new display widget.
- Choose Gauge Widget for the widget type.
- Add a label such as “Light.”
- Choose your XBee Zigbee device by its ID.
- Select ADC1 as the input stream and check the device configuration to make sure it is configured properly.
- Enter “100-(value/1000*100)” to transform the input from millivolts to a simple percentage from 0 to 100. The calculation takes the input value, scales to a decimal, then multiplies by 100 to get a percentage value. Since is technically the percentage of darkness we subtract it from 100 to flip it to the percentage of brightness.
- Add a name for Units such as “percent.”
- Set a low value of 0 and a high of 100 to see the percentage light range displayed.
- Save the changes to see your new Widget.