![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
User a frequecy of response using LM555 in circuit to mensure the capacitor unit
main.cpp
- Committer:
- jhon309
- Date:
- 2015-06-25
- Revision:
- 0:8b2d83f469fa
File content as of revision 0:8b2d83f469fa:
#include "mbed.h" #include "capSense.h" #include <ctype.h> #define RA 51000 // ohms #define RB 22000 // ohms #define PERIOD 2000000 //us Serial pc(SERIAL_TX, SERIAL_RX); CapSense cap(RA, RB, PERIOD, PB_9); int main() { while(1) { float capacitance = cap.measure(); pc.printf("%.4f#%.2f\n", capacitance,(float)cap._count/1.999); } }