Bluetooth mérés program

Fork of RN42-HelloWorld by Chris Styles

main.cpp

Committer:
szabolor
Date:
2013-03-03
Revision:
1:581f6547e8aa
Parent:
0:c1134839fe1a
Child:
2:584102a0bf36

File content as of revision 1:581f6547e8aa:

#include "mbed.h"

AnalogIn an(p15);
Serial rn42(p9,p10);
Serial pc(USBTX, USBRX);
DigitalOut myled(LED1);
int c;

int main() {

    rn42.baud(115200);
    pc.baud(460800);
    // echo back characters, toggle the LED
    while (1) {
        while (rn42.readable()) {
            c = rn42.getc();
            pc.putc(c);
        }
        c.printf("%f",an*3.3);      
    }
}