Hello all,
I am a beginner in Arduino (I have Arduino Uno board) so I have a very limited knowledge about it. Basically this the scenario that I want to realize for my project:
The system activates with pressing a micro button. The music from df player starts to play until I press to another micro button. According to the time between pressing these 2 buttons the different colors off led lights turn on and buzzer sounds differently. Specifically:,
If the time is under 30secs green led turns on and a "happy" buzzer sounds.
If the time is over 30 secs red light turns on and a "sad" buzzer sounds.
Can you please help me about ide codes and the circuit?
Thank you in advance <3
If you are a beginner this is a rather advanced project , but sounds a bit like an assignment ….
As a beginner you need to play about with examples from the IDE or simple projects .
When you get to this particular project , break it down into smaller sections , such as okaying the music , working out how to do timing ( hint : look at blink without delay ) etc .
yeah, it is my assignment for university and unfortunately I have to do it in this way!
Off you go then ! Give it a go . I would presume you have been given some instruction in coding or have time to start working on it .
This comes up a lot and is the learning experience for you . It’s no good asking others how to do it as you will learn nothing .
When you’ve a specific problem with your code the forum will help
As advised above, start taking tiny steps towards the full function. An evening's experiments. OK maybe several evenings. Or mornings.:
Make an LED be on while a button is pushed, and off if not pushed.
Make an LED go on when you press a button, and go off when you press it again.
Make an LED go on when you press one button, and off when you press another button.
Make a red LED go on when you press a button, and extinguish a green LED. Make the other button turn on the green LED and extinguish the red LED.
Make the red LED go on when you push the button, and off after either 30 seconds or you push the button again.
In that last one, if you press the button before 30 seconds, light up the green LED.
You see I have used nothing but a few LEDs (and current limiting resistors) and a few pushbuttons.
When all the above is easy, you can start doing some experiments with the DF player and any other complications.
When you have the DF and other stuff sorted, you can start planning how the separate pieces can be put together.
Divide and conquer. There is nothing sadder than several hundred lines of code that all has to be perfect but isn't yet.
We can help with any experiments or sub-goals that aren't unfolding easily for you. No one was born knowing any of this. Stuff is hard until it is easy, no instant gratification in these endeavors.
You could do all this in the wokwi simulator and relieve yourself of pesky hardware issues, or at least divide and conquer them when they crop,later IRL.
HTH
a7