/** comparatorin_demo * Simple program to demonstrate the basic functions * of the analog comparator of the FRDM-KL25Z board. * * Used library: * - ComparatorIn //https://developer.mbed.org/users/frankvnk/code/ComparatorIn/ * written by Frank Vannieuwkerke * * Hardware requirements: * - FRDM-KL25 board * - CdS photoresistor pulled up by 10 k * - Connecect the midpoint of the divider to PTE29 * * 10k CdS photoresistor * +3.3V --/\/\/\---+---/\/\/\---- GND * | * PTE29 * */

Dependencies:   ComparatorIn mbed

Fork of 05_comparator_demo by Istvan Cserny

Revision:
4:07dd82e3f934
Parent:
2:bb19e60cb933
Child:
7:a4f884972a0e
--- a/main.cpp	Sun Jun 16 20:06:30 2013 +0000
+++ b/main.cpp	Sat Jul 20 16:31:19 2013 +0000
@@ -28,7 +28,6 @@
     compi.rising(&cmp_rise_ISR);                // Set pointer to rising interrupt function
     compi.falling(&cmp_fall_ISR);               // Set pointer to falling interrupt function
     compi.treshold(0.3);                        // Set comparator threshold to 1V = 0.3 * 3.3V
-    compi.int_en(1);                            // Enable comparator interrupts
 
     while(1)
     {