-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added power serial cmds, wakeup cardputer by pressing any key (#64) #85
Conversation
not sure what caused this:
|
Uhhh... espressif/esp-idf#6914 Maybe this could help you |
Any idea what could have caused it? |
my only hypothesis is this new symbol i've added in the code |
prob... I believe that the m5 libraries have a power off function. |
i couldn't find any, deepsleep is closest thing . |
|
void M5Stack::powerOFF() { |
void POWER::deepSleep(uint64_t time_in_us) {
// Keep power keep boost on
setPowerBoostKeepOn(true);
// power off the Lcd
M5.Lcd.setBrightness(0);
M5.Lcd.sleep();
// ESP32 into deep sleep
esp_sleep_enable_ext0_wakeup((gpio_num_t)_wakeupPin, LOW);
if (time_in_us > 0) {
esp_sleep_enable_timer_wakeup(time_in_us);
} else {
esp_sleep_disable_wakeup_source(ESP_SLEEP_WAKEUP_TIMER);
}
while (digitalRead(_wakeupPin) == LOW) {
delay(10);
}
(time_in_us == 0) ? esp_deep_sleep_start() : esp_deep_sleep(time_in_us);
} |
internally, both (My guess is i have to remove the call to |
Whats the issue on using what is already on src/core/PowerSave.cpp? is deep sleep better somehow? /* Put device on sleep mode */
void sleepModeOn(){
isSleeping = true;
setCpuFrequencyMhz(80);
turnOffDisplay();
delay(200);
}
/* Wake up device */
void sleepModeOff(){
isSleeping = false;
setCpuFrequencyMhz(240);
getBrightness();
delay(200);
} |
that's different, i am already using that code for the |
Deep sleep doesn't work properly on the StickCs, because they need to set up the RTC chip to "wake up", and it will work more like a turn-off with scheduled event,... so i don't recommend to turn off the StickCs we can use: StickC Plus 2: for the cardputer I must do some research here |
for the cardputer i've found |
This fixed the problem here for me |
ok, commit the changes |
In the line 10, include the libs like this:
Before starting the music command use:
and after the code finish it with #endif, at line ~298 aproximately... the StickC Plus 1.1 binaty will be at 0x235000 size (fitting the target partition size of 0x260000 |
ok, so the music player is disabled on the STICK_C_PLUS target. |
…n-cardputer targets (pr3y#64)
also fixed "tts" command typo