For slides and example code, see lesson 2
Note: Do not work on this repository right away.
Check existing forks to find the specific repository for your class.
- Connect the LED to port D2*, and the button to D4.
- Combine the previous examples to switch the LED.
- *On the ESP8266, remove LED for programming.
- Look up the pin mapping to adapt the pin numbers.
- Copy and complete the code of the state machine.
- Make sure it works, with a button and LED setup.
- Change it to switch off only, if the 2nd press is long.
- Let's define long as > 1s, measure time with millis()
- Design a kitchen timer to the following specification:
- Displays a countdown to 0, in minutes and seconds.
- Let's the user reset to 00:00, enter a new timespan.
- Allows the user to start the countdown at mm:ss.
- Starts buzzing if the countdown reaches 00:00.
- Use a state machine, get the time with millis().
- Build and implement the kitchen timer you designed.
- Document the timer state machine (ASCII or image).
- Commit the code and docs to the hands-on repo.
- Bring the (working) timer to the next lesson.