First, gain an understanding of *debouncing * and state change detection . There are example sketches (and many more) in the IDE: file/examples/digital/xxx.
Second, you'll need to define some operating parameters. Press three times? Once today, once tomorrow...? Or maybe once every second or three times within one second? James Bond like - one short press, two long presses?
Thanks for a help. I'm a beginner of arduino. I'm at "blinking led". I don't want to learn now because I want to build useful project for my vape and program a very tiny arduino. I'm not working with arduino everyday.
lastchancename:
I hope the OP learns something JW.
You have certainly helped, but he didn’t lift a finger to help himself...
I hope they learn something, too. As written, the program does nothing. If they want it to do the "something" in the problem description then they will have to figure that out. And if they want the program to do anything after the third press, they will have to figure that part out, too.
And those presses had better be short since I forgot to put in StateChangeDetection.
mr_surykatek:
Thanks for a help. I'm a beginner of arduino. I'm at "blinking led". I don't want to learn now because I want to build useful project for my vape and program a very tiny arduino. I'm not working with arduino everyday.
I think this is what you are looking for. This way, you don't have to learn now.
mr_surykatek:
Thanks for a help. I'm a beginner of arduino. I'm at "blinking led". I don't want to learn now because I want to build useful project for my vape and program a very tiny arduino. I'm not working with arduino everyday.