# Satellite_Example5_Sleep ESP-IDF version of the Arduino example [Satellite_Example5_Sleep.ino](../../examples/Satellite_Example5_Sleep/Satellite_Example5_Sleep.ino). This example powers the module on, sends an SBD message, then powers the module down (AT+CPWROFF) and waits. This example needs the PWR_ON pin. Sending messages uses credits! The SBD session is non-blocking (setSBDCallback): bufferedPoll calls the callback when the session is complete. Based on the SparkFun IridiumSBD I2C Arduino Library example Example5_Sleep. ## Hardware * An ESP32 (or other ESP-IDF target) connected to the Iridium 9604 via a UART * Connect: ESP32 TX to 9604 RXD; ESP32 RX to 9604 TXD; GND to GND * Optionally connect RTS / CTS (hardware flow control) and PWR_ON * Connect PWR_ON - and set the PWR_ON GPIO in menuconfig ## Building ``` idf.py set-target esp32 idf.py menuconfig # "Example Configuration": UART port, baud rate and GPIO pins; set the PWR_ON GPIO idf.py -p PORT flash monitor ``` `main/idf_component.yml` points at the library in this repository (`override_path: "../../../"`).
To create a project from this example, run:
idf.py create-project-from-example "sparkfun/sparkfun_iridium_9604_library=1.0.0:Satellite_Example5_Sleep"