Go Down

Topic: Push button and limit of Atmega328p (Read 150 times) previous topic - next topic

sumeetsingh180

May 12, 2019, 04:57 am Last Edit: May 12, 2019, 04:59 am by sumeetsingh180
I wrote a simple sketch in arduino that reads how many times a push button is pressed i have used 4 push buttons.Now i am wondering what is the number of times the button is pressed exceeds 1024 the maximum value of Armed328p will it reset arduino after that or it can still read the no of times push button is pressed

lesept

If you count the number of pushes and store that number in a variable, then the type of this variable will tell you the maximum number before reset to 0.
An unsigned int will go up to 65536
An unsigned long will reach 4,294,967,295 (2^32 - 1).
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

Go Up