yuuki takiya
/
mbed_22
a
Revision 0:2b8a8135f8cf, committed 2014-07-09
- Comitter:
- ty0715
- Date:
- Wed Jul 09 07:40:22 2014 +0000
- Commit message:
- a
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SCP1000.lib Wed Jul 09 07:40:22 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/kadams6/code/SCP1000/#47d6f205890b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jul 09 07:40:22 2014 +0000 @@ -0,0 +1,43 @@ +#include "mbed.h" +#include "SCP1000.h" + +Serial xbee(p9,p10); +Serial pc(USBTX, USBRX); +SCP1000 scp1000(p5,p6,p7,p8); +DigitalOut a(p19); +AnalogIn UV(p20); +PwmOut servo(p21); + +int main() { + float temp; + //char sv; + + a=0; + //servo.period_us(32000); + while(1) { + + + temp=UV; + + //sv=xbee.getc(); + //sv=xbee.getc(); + //if(sv=='O'){ + //servo=0.02; + //printf("O\n"); + // } + //if(sv=='C'){ + // servo=0.04; + // printf("C\n"); + // } + + printf("%8.2f#,",temp*3300); + printf("%d@,%4.1f\n", scp1000.readPressure(), scp1000.readTemperature()); + + xbee.printf("$%8.2f#",temp*3300); + xbee.printf("%d@%4.1f\n", scp1000.readPressure(), scp1000.readTemperature()); + + wait(0.5); + + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jul 09 07:40:22 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721 \ No newline at end of file