Nano 33 IoT Exit Sleep Mode on HTTP request received

Greetings, All. Love the forum, first post. WRT the topic, I am trying to put together a project where the Nano IoT sends BME688 data to a windows python server via Wifi HTTP. Have this working (kinda), but am trying to size the battery. I would like to put the Nano in sleep mode and wake up upon receipt of a polling request from the server. Does the Nano support a "Wake-up on demand capability?

I can work around this with timers (my JSON message includes a time stamp, and the server can specify when the Nano needs to wake up). But this is plan B. Can anyone point me to where I can research this?

Thanks. Best Regards, Loyd.

how will you put the NINA module to sleep?

Greetings, Juraj.

That turned out to be more difficult than anticipated. Finally stumbled upon a package that "seems" to work. Arduino Low Power - Arduino Low Power - Arduino Reference. Got it to work, but haven't had time to put it on an amp meter to see how well it works.

Big caveat: output to the serial monitor works until you enter a sleep cycle, and is inop upon wakeup. Will keep playing with that. Perhaps explicitly closing the serial port prior to sleep and restarting it after wakeup might work, but haven't explored that possibility as of yet. Plus, since this is an embedded, remote sensor project, a non-operational serial port isn't that big of a deal.

One of the examples provided - TimedWakeup, works out of the box. I would copy and paste it below if I could figure out how to paste code in the dialog box.

One more thing. There is an empty "void dummy ()" function at the end of the file that, per the comments, runs under the context of an interrupt associated with the timer controlled wake up. Not immediately obvious how this function is associated with the internal timer interrupt. Has to be abstracted away in the C code. And since it runs in interrupt context, it has to be short and quick (you probably knew that - it was a lesson I learned the hard way).

Hope this helps. Be well. Loyd.

you know you have there on board a second and more power hungry MCU, the esp32 NINA WiFi module

No, I didn't know. Thanks for telling me. Doesn't matter, though. I needed 2 temperature sources for the network, and they were in my inventory. Plus, this project is more of a learning experience than pursuit of an optimized network.

Out of curiosity, what would you recommend as a substitute for the Nano 33 Iot? I have a few RP Pico's that are still in the box. And a couple of Adafruit ESP32 feathers (my first choice), but I am having trouble getting them to work. Network issue, I think. Being new to python, I would have liked to have taken that path.

Anyway, thanks for the feedback. Have a nice one.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.