Hi Sara and Rui!
I am currently working on a project involving TTGO Lora SX1278, very similar to the SX1276 and I want to make them sleep and then waking them up again using an external interruption.
I am using the GPIO_NUM_12 in order to wake up these modules. I copy here part of the code:
//Increments boot number and prints it every reboot
bootCount++;
Serial.println(“Boot number: “+String(bootCount));
sendData(); //sends the data….
//deep sleep
esp_sleep_enable_ext0_wakeup(GPIO_NUM_12,HIGH); // interruption in the pin 12 ,wake up when this pin 12 in // TTGOgoes to HIGH
Serial.println(“Entering deep sleep mode”); //
Serial.print(“Setup ESP32 to sleep until it is waken up thanks to GPIO_NUM_12”);
Serial.println(“Going to sleep now”);
Serial.flush(); // waits for the transmission of outgoing serial data to complete
delay(10000);
esp_deep_sleep_start();
Serial.println(“This will never be printed”);
}
void loop() {
}
void sendData(){
Serial.println (“Sending packet: “);The problem is …I can’t wake them up :(. When I power on the modules,
//MORE CODE
When I power the module for the first time, it sends the data properly and the receiver prints in its OLED screen the data received and the transmitter goes to sleep as expected, but as I said I can’t wake it up :(.
Have you ever worked with the TTGO this way???
Thanks a lot for your help and above all, thanks a lot for your work!!
I answer myself, I can wake it up now! :-)…
I was using a map of the pinout that was wrong…in my desperation I tried to feed all the pins with 5 V until I found that with just the opposite pin I thought, it woke up properly, it’s a good thing that the GND and 5 V pins are shor-circuited with their opposite ones….
Thank you anyway! Rui and Sara!!…, great work!
Carlos.