Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 8 months ago.
My stm is not realizing any interrupts from external buttons, please help?
I am using stmnucleo L152RE. I tried analog as well s digital pins but the board is not taking any inputs from those buttons. But when I used the USERBUTTON as up button it realized both the buttons . when I use USERBUTTON as start interrupt it does not accept any input.
DigitalOut switchengine(PC_2); DigitalIn pin_up(D4); DigitalIn pin_down(D8); InterruptIn pin_start(PC_13); //part of main code... int i= 0; pin_up.mode(PullDown); pin_down.mode(PullDown); pin_start.mode(PullDown); float time; lcd.locate(3,0); lcd.printf("SET TIME"); do{ if(pin_up==1) {i= i++; wait(0.1); if (i>200) i=200; time = i; if(i<4){ lcd.cls(); lcd.locate(1,0); lcd.printf("Time= %2.2f mn", time*15); }