Ljubivoj Cvitas
/
SerialMBEDtoMSP430
TVZ test
Diff: main.cpp
- Revision:
- 2:2e261aa02cd0
- Parent:
- 1:abeac322d8d8
- Child:
- 3:a4a5d9c0bc13
diff -r abeac322d8d8 -r 2e261aa02cd0 main.cpp --- a/main.cpp Tue Jan 07 16:44:56 2014 +0000 +++ b/main.cpp Wed Jan 08 14:09:05 2014 +0000 @@ -7,12 +7,14 @@ DigitalOut strobe(p7); //a strobe to trigger the scope DigitalIn switch_ip1(p5); DigitalIn switch_ip2(p6); +Serial pc(USBTX, USBRX); char switch_word ; //the word we will send char recd_val; //the received value int valueADC; char Outbuff[2]; char Inbuff[2]; +int valueSensA; int main() { async_port.baud(9600); //set baud rate to 9600 (ie default) @@ -64,5 +66,7 @@ } wait(0.5); RXDIN = 0; + valueSensA = Inbuff[1]+ Inbuff[0]*256; + pc.printf("SensA: %d \n\r", valueSensA); } }