I'm a newbie in arduino, I am want to make a function to add 1 to a variable once(like a pulse) and then add 1 every milisecond after 3 seconds

Hi manthan,

I'm talking very serious to you:

the only reason why I did not wrote any supporting posts is: your almost non-existant own effort

this super-short and poor sentence you wrote above is wayyy toooo lessss.

it is you who has to write a detailed description of what your code should do and what your code is doing instead.

By writing this poor short sentence you force your potential helpers to rebuild your circuit in the exact same way and then to do the work you are supposed to do:
To analyse what the code does.

What is so hard about writing this detailed description??!
Are you busy with your girlfriend and can only afford 15 minutes within the next four days????
Do you hope for that somebody will post a ready to use code for your hardware ??

What does it need more to wake up and understand that it is you who has at least to ask specific questions?

Questions that go far behind "please check it once"

If you would invest 5 minutes of your superworthy time to read other threads
you would recognise that there are a minimum of 15 experienced users engaging with decent advice and tips to all people that show own effort.

The almost silence you receive even that you have pressure to finish your project is caused by not showing own effort. And now you are in a position where just writing "I tried for hours" will not be trusted.

Now you are in the situation that you have to prove your own effort. Prove by actually writing a detailed description of what your code should do and what other behaviors you want your code to do.
Proving by asking specific questions to your code.

best regards Stefan

I hope you understand

ok Stefan,
I will try to improve myself by next time,
the project is now successfully completed.
Your comment about hard work and own effort helped me a lot by making me search about interrupt function.
So I really thank you for that.

and let me clarify, I'm just 13 and luckily I don't have a Girlfriend (to waste time on) and because of online classes I don't get a lot of screen time that is why I don't write detailed description.

I am sorry for any inconvenience.

And to prove that I worked on it, I can even mail you a video.

Thanks to everyone for helping me.

regards Manthan

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.