First Last
/
LDC1000_test
Test program to evaluate the LDC1000 library
main.cpp
- Committer:
- hamid567
- Date:
- 2015-08-18
- Revision:
- 3:d8666452bc80
- Parent:
- 0:b5c33adf86fc
File content as of revision 3:d8666452bc80:
#include "mbed.h" #include "LDC1000.h" #include <iostream> using namespace std; Serial pc(USBTX,USBRX); int main(void) { LDC1000 ldc(PTD2,PTD3,PTD1,PTB0,100E-12, 6000000, PTA13); while(1) { // wait_ms(100); // pc.printf("RawL is: %ux \r\n",ldc.readRawL()); // pc.printf("_Raw_L is: %ux \r\n",ldc.get_raw_l()); /* pc.printf("********************************************************* \r\n"); pc.printf("_Raw_L is: %e \r\n",ldc.get_raw_l()); // wait_ms(100); pc.printf("fsensor is: %e \r\n",ldc.get_fsensor()); //wait_ms(100); pc.printf("frequency is: %e \r\n",ldc.get_frequency()); //wait_ms(100); pc.printf("responsetime is: %e \r\n",ldc.get_responsetime()); //wait_ms(100); pc.printf("Cap is: %e \r\n",ldc.get_cap()); //wait_ms(100); pc.printf("Induction is: %e \r\n",ldc.getInductance()); pc.printf("********************************************************* \r\n"); wait_ms(1000); */ pc.printf("%4.0f",ldc.get_raw_l()); pc.printf(", %f \r\n", 1000000*ldc.getInductance()); /* wait_ms(600000); 10 min */ wait_ms(1000); } }