-
1Step 1
You need to:
- Open terminal
- Go to the /examples/zolertia/tutorial/99-apps/mqtt-node:
- Edit the Makerfile with ubidots and lighting:
- Copy the token of the ubidots account and paste it in ubidots.h inside the cloud folder:
- Check the RE_Mote is connected to program:
- Upload Makefile in the RE-Mote:
- The next step is to program and configure the Orion, it is explained in GitHub.
How To Get It Done
If successfully uploaded, you will see through the terminal the RE-Mote response that constantly loads the sensor values and periodically publishes them with the address of the device.
On the ubidots platform within devices and on the device that matches the published address you can see all the variables uploaded form the device.
Led_toggle is a variable that is not generated, the device does not load it on the platform, but the platform loads it on the device. To control the led we need the variable led_toggle, for that click Add Variable, Default and the name led_toggle.
In dashboard we will create a widget, Control, Slider, Add Variable, click in the address of the device, led_toggle, Max: 100, Min: 0, Add Variable.
If you slide the bar you will see how the led lights up and the values are published in terminal, the value of the bar is between 0 and 100, on the device this value has to be 16 bit which reaches 65535, to control it is multiplied by a factor so 100 * 655 = 65500.
This is an example of the device running lighting demo:
With the slide of leds_toggle, it controls the brightness of the LED, the gauge and the chart are the published value every 45 seconds of the light sensor.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.