- MicroPython Cookbook
- Marwan Alsabbagh
- 80字
- 2021-06-24 14:28:13
There's more...
This code can be put into a function that receives an argument count, which specifies how many iterations or seconds the alarm is sounded for. Then, for any code in your project, you could call the function to make your board play an alarm for 10 seconds or 30 seconds. You could also combine this recipe with others in the book to make the pixels on the board flash red in the same way that an alarm would.