Hi all, can anyone please help me in setup up the timer interrupt? I could only see the printing of "Entered 2". Kindly check on the attached text file for my code. Kindly assist. Thanks in advance.
Hi all, can anyone please help me in setup up the timer interrupt? I could only see the printing of "Entered 2". Kindly check on the attached text file for my code. Kindly assist. Thanks in advance.
Thank. Now i able to get into interrupt function but now having another problems
Now i realized that after going into the "start_timer()" function it couldn't come out. As i put a printout after start_timer() inside the setup(), nothing is printed out. Any idea?
adrianwong, your code differs from my code. And please copy and paste my code exactly. My code separates function prototype and body.
I've just modified my code corresponding to your new code with Arduino 1.6.7 and BLE Nano v1.5(32KB). I don't know how long timer interval do you want. But my code print out 'Entered 1'.
okay. I try changing comp1 to have the timer interval of 1s. but is not working.
Now it is working and displaying "Entered 1". I realized that add this line "if ((tCount % 300) == 0)" make the difference. What is the reason?