juan carlos cortes parra
/
aplicada
ghf
Revision 0:202a5b1a761f, committed 2020-10-22
- Comitter:
- juankafil1
- Date:
- Thu Oct 22 02:11:48 2020 +0000
- Commit message:
- perras
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 202a5b1a761f main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Oct 22 02:11:48 2020 +0000 @@ -0,0 +1,44 @@ +#include "mbed.h" +Serial rs232(USBTX,USBRX); + +AnalogIn AN0(PTB0),AN1(PTB1),AN2(PTB2); + +float valor_adc,valor2,valor3; + +int main(){ + + wait(1); + while(true){ + valor_adc=AN0; + valor2=AN1; + valor2=valor2*10; + valor_adc=valor_adc*10; + valor3=AN2; + valor3=valor3*10; + if((valor_adc<1)&&(valor2<1)&&(valor3<1)){ + rs232.printf("@ %2.1f# %2.1f# %2.1f",valor_adc,valor2,valor3); + wait(0.2);} + if((valor_adc<1)&&(valor2<1)&&(valor3>1)){ + rs232.printf("@ %2.1f# %2.1f#%2.1f",valor_adc,valor2,valor3); + wait(0.2);} + if((valor_adc<1)&&(valor2>1)&&(valor3<1)){ + rs232.printf("@ %2.1f# %2.1f# %2.1f",valor_adc,valor2,valor3); + wait(0.2);} + if((valor_adc<1)&&(valor2>1)&&(valor3>1)){ + rs232.printf("@ %2.1f#%2.1f#%2.1f",valor_adc,valor2,valor3); + wait(0.2);} + if((valor_adc>1)&&(valor2<1)&&(valor3<1)){ + rs232.printf("@%2.1f# %2.1f# %2.1f",valor_adc,valor2,valor3); + wait(0.2);} + if((valor_adc>1)&&(valor2<1)&&(valor3>1)){ + rs232.printf("@%2.1f# %2.1f#%2.1f",valor_adc,valor2,valor3); + wait(0.2);} + if((valor_adc>1)&&(valor2>1)&&(valor3<1)){ + rs232.printf("@%2.1f#%2.1f# %2.1f",valor_adc,valor2,valor3); + wait(0.2);} + if((valor_adc>1)&&(valor2>1)&&(valor3>1)){ + rs232.printf("@%2.1f#%2.1f#%2.1f",valor_adc,valor2,valor3); + wait(0.2);} + } + } +
diff -r 000000000000 -r 202a5b1a761f mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Oct 22 02:11:48 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/994bdf8177cb \ No newline at end of file