I am using the arduino iot cloud. the problem is as follows. if i power down the esp32 and go on my phone to arduino cloud i see my button to get to the dashboard i need. problem is the dashbord works even though the esp32 is powered down. of course nothing happens with the esp32 since it is powered down. the dashboard doesn't recognize the esp32 is powered down. how do i indicate on the dashboard the esp32 is down. the arduino cloud connects fine.
I hope this makes sense.
below is what is on a dashboard also on my phone. here is the problem. the slider works and the on/off button works. but i have the esp32 powered down. the buttons work but of course the esp32 does nothing since it is powered down. how can i tell if the esp32 is on or off. i have no problem connecting to arduino cloud.
/*
You will need to make a cloud boolean for this to work.
I named it connected.
Paste this code in to your cloud program.
*/
void setup() {
connected = true;
// do your setup things
}
void loop() {
// do your loop things
// wake up
connected = true;
// do your stuff
// now to go to sleep
connected = false;
// put your go to sleep code here.
goToSleep();
}
Here is what you can use on the dashboard:
It's called status. It is a widget.
I tried everything I know. I can’t get the status or led widget to work (read/write enabled, boolean). If on the dashboard I click the led should it change colors? Or would it only change if I change the variable in the sketch. So, I tried both ways and nothing happens. The same holds true for the status widget.
The variables led & statusButton (this is a status widget, not a button, I just named the status widget statusButton) are both Boolean read only(also tried with read/write)
The led and statusButton on the dashboard, always green, never change, the serial print shows the 2 variables change value but not the widgets themselves. When I start the sketch I immediately got to the dashboard because the value of both is 0, then after a few seconds and connect the variables change to 1 but the widgits stay green even when variables are 0.
You are setting a cloud variable to false when you are not connected to the cloud.
In the future please use code tags to post code.
Why do you need two bools?
i've tried this, the status still doesn't change. I am connected. i went as far as to change the status from 1, delay 1 second , 0, delay 1 second in the loop, the status is always on.. are you sure there isn't a problem with the status widgit.