Isme plot hotai LDR aur POT ka value, wrt time serial plotter ke graph me. Baud rate 9600 select karneka aur axes 2 select karna mat bhulna
Dependencies: mbed
main.cpp
- Committer:
- akashlal
- Date:
- 2016-07-01
- Revision:
- 1:3151bf0df238
- Parent:
- 0:709cf4309909
File content as of revision 1:3151bf0df238:
#include "mbed.h" Serial pc(USBTX,USBRX); AnalogIn pot(PTB0); AnalogIn ldr(PTB1); //This progeram is to be submitted for report 02 float potf; int poti; float ldrf; int ldri; int main() { while(1) { ldrf=ldr.read(); ldri=ldrf*1000; potf=pot.read(); poti=potf*1000; pc.printf("$%d %d;",poti,ldri); pc.printf("\n \r"); } }