rohan gala
/
bigthingRec
BIGTHING
main.cpp
- Committer:
- rohangala
- Date:
- 2015-06-15
- Revision:
- 0:98be6bf27557
- Child:
- 1:630aef63181c
File content as of revision 0:98be6bf27557:
#include "mbed.h" #include "stdio.h" DigitalOut myled(LED1); Serial pc(USBTX, USBRX); Serial micro(PTD3, PTD2); // tx, rx char buff[]={'\0'}; int num,val; int main() {myled = 1; // wait(3); while(1) { if(micro.readable()) { myled = 0; uint8_t val=(micro.getc()); myled = 1; wait(1); myled = 0; uint8_t num=(micro.getc()); myled = 1; if(val == 0x01) { printf("The Temperature is : "); pc.putc(num); //pc.putc(val); } if(val == 0x02) { printf("The Lux Value is : "); pc.putc(num); } val=0x00; // display.PrintInteger(num,3,0); myled = 0; // printf("%d\n\r",x); wait(2); myled=1; } } }