Simple program to demonstrate the basic functions of the analog comparator of the FRDM-KL25Z board.
Dependencies: ComparatorIn mbed
Fork of ComparatorIn_demo by
ComparatorIn demo
Simple program to demonstrate the basic functions of the analog comparator of the FRDM-KL25Z board.
The blue LED flashes after 2 sec delay. The green LED is driven by the interrupts of the Analog Comparator (LED ON at rising edge, LED OFF at falling edge).
The output of the Analog Comparatir is also tested by polling, the result is printed out at the standard output (UART0). The default speed and format (9600 bps, 8,N,1) are used.
Credits
This program is based on the ComparatorIn library and the ComparatorIn_demo program written by Frank Vannieuwkerke
Used library:
- ComparatorIn written by Frank Vannieuwkerke
Hardware requirements:
- FRDM-KL25 board
- CdS photoresistor pulled up by 10 k
Revision 8:a5b18dfe684f, committed 2015-11-18
- Comitter:
- icserny
- Date:
- Wed Nov 18 15:29:18 2015 +0000
- Parent:
- 7:a4f884972a0e
- Commit message:
- First version
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r a4f884972a0e -r a5b18dfe684f main.cpp --- a/main.cpp Wed Nov 11 08:12:13 2015 +0000 +++ b/main.cpp Wed Nov 18 15:29:18 2015 +0000 @@ -1,4 +1,4 @@ -/** comparatorin_demo +/** 05_comparator_demo * Simple program to demonstrate the basic functions * of the analog comparator of the FRDM-KL25Z board. *