Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "string" 00002 #include "mbed.h" 00003 #include "sstream" 00004 Serial pc(USBTX,USBRX); 00005 DigitalIn valor(PTC5); 00006 DigitalOut right(PTC7); 00007 DigitalOut left(PTC0); 00008 int rea; 00009 string cadena; 00010 using namespace std; 00011 //using namespace boost; 00012 float h; 00013 00014 int main(){ 00015 while(1){ 00016 if(pc.readable()){ 00017 cadena=pc.getc(); 00018 //h=rea-50000; 00019 // pc.printf("%s",); 00020 // std::string Convert(float rea); 00021 //cadena=float.toString("%f",rea); 00022 pc.printf(cadena); 00023 } 00024 /* if(rea=='1'){ 00025 pc.printf("hola perras"); 00026 right=1; 00027 00028 // wait(1); 00029 }else{ 00030 pc.printf("esperando"); 00031 right=0; 00032 //wait(1); 00033 // led=0; 00034 00035 } 00036 if(rea=='2'){ 00037 left=1; 00038 //wait(1); 00039 }else{ 00040 left=0; 00041 //wait(1);*/ 00042 } 00043 } 00044 00045 00046
Generated on Fri Jul 29 2022 07:47:38 by
1.7.2