5V
3.5V
It worked for me the first time. But, I struggled with using the rotatory encoder for my timer part. I wanted to use the button part of the rotator to work as a state changer. I was expecting the loop option will get the state of the button as pressed or released, but that didn't work. After pressing the button, I was continuously getting the HIGH value in the digitalRead. I used a switch button instead, which also had the same problem. After using a logic in the code to detect state switch, I was able to emulate the pressed/released option correctly in the code.
lcd.print("Sunny Ladkani!");
int noteDuration = 1000 / noteDurations[thisNote]; to int noteDuration = 1000 / noteDurations[thisNote]/2;
I think it's the star wars
The timer works as a state machine.
- To start, you press the button at the centre of the breadboard.
- You are taken to the "main menu" state where you can select the following -
- Set Timer
- Clear Timer
- Go Back
- When you press the button for "Set Timer", you are taken to a new state where you can use the rotatory encoder to input time. * On next press, you are given the option to start timer or go back.
- On press, the timer starts and when it finishes, the "Star wars" music plays.