![]() After this finishes executing, the loop() function begins executing continuously. This initializes the M5 SDK, clears the screen and creates a drawing area on it, then displays an initial “Press to start” message. You can read about this function in the Arduino documentation. The device doesn’t have a real time clock, so to monitor the passing of time I’m using the Arduino millis() function which tracks the number of milliseconds since the program started running (effectively the time the device was turned on). Other global variables track which iteration of the process we’re in so that we can have the longer break after 4 working periods, how many minutes are left in the current state, and the time at which we entered the current state. I’m storing the current state in a global variable named currentState, whose initial value gets set to STATE_IDLE.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |