Why does this not work?

I thought it should, at least, turn on the light (Huzzah ESP32), and maybe toggle the light each time the button is pushed.

It compiles, and installs in the ESP32, and the app on the iPhone displays the switch, and the switch moves back and forth when touched.

The light is always off.

light on_off.atmo (18.6 KB)

Hi,

One way I like to debug things like this is the Debug Print element. The trick is isolating the problem to either your app or the ESP32. In this case, the issue is that you’re not sending a boolean to the ESP32. Try changing “value” on the “Write” ability of your BLE element on the App View to “false” instead. This seems to work alright for me. I’ve attached a fixed atmo with some debug as well.

-Nicklight on_off_nrcrast.atmo (21.1 KB)

Thanks Nick. That worked great. The debug print element is a bit “higher up the ladder” for me. Here’s a picture of my test bench.

Joe