Implementing period sleep and wake up in qf_ssi_ai_app Project

Post Reply
phatta
Posts: 8
Joined: Tue Jan 19, 2021 3:51 am

Hello,

I want to create a timer so that the quickfeather board wake ups every 10 minutes , performs audio recognition and goes back to sleep again.
How do I achieve that in the qf_ssi_ai_app Project?
Please Help !
tom1012001
Posts: 1
Joined: Fri Jun 07, 2024 7:33 am

My recommendation would be to start by researching the specific capabilities of the QuickFeather board and the available power management and audio processing features. Then, plan out the overall architecture and workflow for your desired functionality, breaking it down into smaller, manageable tasks. Finally, implement and test the solution step-by-step within the qf_ssi_ai_app project. slope game
terallytension
Posts: 1
Joined: Thu Aug 01, 2024 8:53 am

To achieve a 10-minute wake-up timer for audio recognition on the QuickFeather board in the `qf_ssi_ai_app` project:

1. **Configure Timer**: Set up a hardware timer togeometry dash trigger every 10 minutes.
```c
void timer_callback(void) { wake_flag = 1; }
void setup_timer(void) {
hal_timer_start(600000); // 600000 ms = 10 minutes
hal_timer_set_callback(timer_callback);
}
```

2. **Wake and Sleep Logic**: Implement the main loop to handle waking up, performing audio recognition, and sleeping.
```c
volatile uint8_t wake_flag = 0;
void main_loop(void) {
while (1) {
if (wake_flag) {
perform_audio_recognition();
wake_flag = 0;
go_to_sleep();
}
}
}
void go_to_sleep(void) { hal_power_sleep(); }
```

3. **Modify Project**: Integrate the timer and sleep logic.
```c
int main(void) {
system_init();
setup_timer();
main_loop();
return 0;
}
```

Ensure proper initialization and power management for correct low-power operation.
mageorrec
Posts: 1
Joined: Wed Mar 05, 2025 4:31 am

You can use a low-power timer or RTC to wake the QuickFeather board every 10 minutes. Implement a timer interrupt to trigger the wake-up, perform audio recognition, and then put the board back to sleep. Check the QuickFeather docs for relevant APIs.
scullboots
Posts: 2
Joined: Wed Nov 20, 2024 9:02 am

Some fan-made maps are so well-designed they look like official releases.
Post Reply