• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Module 3, Unit 4 – esp_sleep_wakeup_cause_t

Q&A Forum › Category: ESP32 › Module 3, Unit 4 – esp_sleep_wakeup_cause_t
0 Vote Up Vote Down
Clyde Cox asked 5 years ago

What is the function of “esp_sleep_wakeup_cause_t” used in the funcion “print_wakeup_reason()”?

Question Tags: What is the function of "esp_sleep_wakeup_cause_t" used in the funcion "print_wakeup_reason() ? ?
1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Clyde.

The esp_sleep_wakeup_cause_t before the wakeup_reason variable is declaring the wakeup_reason variable as a type of esp_sleep_wakeup_cause_t.

For example, when you use:

int bootCount

You’re declaring the bootCount variable as an int type.

In this specific example, the wakeup_reason variable is declared to save the reason that caused the wakeup and print a message on the Arduino IDE Serial monitor for debugging and testing purposes. That way you know if the ESP has woken up because of the reason you’ve defined (or any other reason that has caused the wake up).

I hope this makes sense.

Regards,

Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2023 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.