Dersler
/
Nucleo_InterruptIn_counter
InterruptIn örneği
Fork of InterruptIn_HelloWorld by
main.cpp
- Committer:
- ctasdemir
- Date:
- 2018-05-11
- Revision:
- 6:0fa52feea38a
- Parent:
- 5:62afaa6c5cb9
File content as of revision 6:0fa52feea38a:
#include "mbed.h" volatile int count = 0; InterruptIn interrupt(USER_BUTTON); void increment() { count++; } int main() { interrupt.fall(&increment); // increment fonksiyonunu kesmeye bağlıyoruz while(1) { printf("Sayac degeri %d\n", count); wait(2); } }