Also I think you didn't get the full idea that I am working on..
The keypad is wired into different circuit that is using it... I need to monitor this key pad and check which button was pressed... to get the idea please see this pseudocode to get the idea:
The keypad is implemented this way: pin1 & 2 are the driving lines; pins 10 - 12 are sensing lines
pin 1 pin 2
| |
pin10--pwr------ |----
| |
pin11--tUp-----tDwn--
| |
pin12--fan-------|----
| |
to detect which button is clicked I have to do this way:
while(true){
if (pin 1 == low){
if(pin10 == low)
pwr is clicked;
else if(pin 11 == low)
tUp is clicked;
else if(pin 11 == low)
fan is clicked;
}
else if (pin 2 == low){
if(pin 11 == low)
tDwn is clicked;
}
}
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Also I think you didn't get the full idea that I am working on..
The keypad is wired into different circuit that is using it... I need to monitor this key pad and check which button was pressed... to get the idea please see this pseudocode to get the idea:
to detect which button is clicked I have to do this way: