How to make instant stop button in the keypad.h library
hi
,
me below
if pressed '1' key arduino actions 60 seconds , want able stop these action instantly while it's running pressing '2' key
i know make loop stop or reset it, can use
but don't know how make work, tired lot (while) function no luck . newbie please ^_^

me below
if pressed '1' key arduino actions 60 seconds , want able stop these action instantly while it's running pressing '2' key
i know make loop stop or reset it, can use
code: [select]
void (*resetloop)(void)=0;
but don't know how make work, tired lot (while) function no luck . newbie please ^_^
code: [select]
#include <keypad.h>
const byte rows = 4;
const byte cols = 4;
char hexakeys[rows][cols] = {
{'0','1','2','3'},
{'4','5','6','7'},
{'8','9','a','b'},
{'c','d','e','f'}
};
byte rowpins[rows] = {3, 2, 1, 0};
byte colpins[cols] = {7, 6, 5, 4};
//initialize instance of class newkeypad
keypad customkeypad = keypad( makekeymap(hexakeys), rowpins, colpins, rows, cols);
void setup(){
serial.begin(9600);
}
void loop(){
char customkey = customkeypad.getkey();
if (customkey=='1'){
//done actions take 60 second
}
}
oops post in wrong topic 

Arduino Forum > Topics > Device Hacking > How to make instant stop button in the keypad.h library
arduino
Comments
Post a Comment