I am trying to put 4 LEDs and control them over the Ubidots dashboard with a switch. However, I could not do it with the Ubidots library available on the build.particle.io. Could someone please guide me, a newbie in all of these? Any and all help is appreciated. @mariahernandez I was looking for the pictures because I was trying to find out how to do this.
Greetings, you can do that using MQTT, this video may serve you as reference: https://www.youtube.com/watch?v=ynhJ4YhhQEM
You can use the MQTT particle library as starter point: https://github.com/ubidots/ubidots-particle-mqtt/blob/master/examples/UbidotsSubscribe/UbidotsSubscribe.ino
All the best
At first, welcome to Ubidots
You can establish the communication between Ubidots & Particle in two ways:
By using the Ubidots Particle Library you should call the get or getValueWithDatasource method with the identifier or label of the variable desired to be controlled. In the following link you will find the sample code of how to use both methods. In your case, you need to obtain 4 different variables in order to control the 4 LEDs.
Once you are able to receive the values in Particle from the Ubidots variable, then you need to establish the logic in your code in order to start controlling the LEDs based on the value received from Ubidots.
By using Particle Webhook you should refer to the step #3 of the guide provide. Over there you will find how to control just one variable, so in your case, you need to repeat the same process for each variable.
I hope all this information help you to start with your IoT project!
All the best,
Hello Karem. I am new to the forum.
The link you provided doesnt work.
Could you please update that, as I would also like to view the guide to control a Particle device via ubidots.