Good morning, I am new to arduino and arduino IOT CLOUD, I was doing tests in postman with the apis to be able to turn my sensor on and off, but I could not identify the specific api to be able to do it, I was trying with:
This endpoint does update the boolean value of my sensor and it is reflected in the arduino iot cloud dashboard but it fails to turn on my sensor. Could someone please help me? I will appreciate your prompt response.
It can be frustrating at first not knowing the basics, but I would not recommend touching IOT CLOUD, without knowing the basics... my recommendation would be to start turning a led on and off using the mobile's Bluetooth, do very basic things like control a servo and etc... Once you understand this... Basically there is not much history, little difference you will see between turning on a Led and a motor of a giant machine.
The better way to understand it is use C
Thanks for the answer, what happens is that I am working with Auduino Iot cloud I already have my code in C and the configuration of my dasboard in arduinio iot cloud what I really want is to make my own dasboard in angular and for that reason I Doubt I want to turn on the sensor from my own dasboard, for this I went to the rest api provided by arduino iot cloud what I want you to help me if possible I turn my sensor on and off through these rest api
Cross-posting is against the Arduino forum rules. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.
Repeated cross-posting can result in a suspension from the forum.
In the future, please only create one topic for each distinct subject matter. This is basic forum etiquette, as explained in the "How to get the best out of this forum" guide. It contains a lot of other useful information. Please read it.
This is the request in postman and according to the documentation the return is with status 200 . Please, maybe I'm making a mistake in the api, maybe it's another one so I can turn my led on and off in this case, because if I can do this, I can turn any sensor that I implement on and off
This is the code which interacts with the board which turns a led on and off because I want to do the same thing using the rest api provided by the arduino iot cloud but I can't make my led turn on and off more, just update the value to true more It is not reflected that my led turns on or off I attach the images of the code in C and the execution in postman of the api that changes the value of the led property
To turn it OFF, just replace "value": true with "value": false.
I think you can use also "value": 0 or "value": 1 since they will be interpreted as boolean values.
Regarding the sketch, this is what I used, it should be almost identical to yours (I've just used the built-in LED for simplicity.