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
- Committer:
- poresc
- Date:
- 2020-10-25
- Revision:
- 0:8b3f25c2e7ed
File content as of revision 0:8b3f25c2e7ed:
#include "string"
#include "mbed.h"
#include "sstream"
Serial pc(USBTX,USBRX);
DigitalIn valor(PTC5);
DigitalOut right(PTC7);
DigitalOut left(PTC0);
int rea;
string cadena;
using namespace std;
//using namespace boost;
float h;
int main(){
while(1){
if(pc.readable()){
cadena=pc.getc();
//h=rea-50000;
// pc.printf("%s",);
// std::string Convert(float rea);
//cadena=float.toString("%f",rea);
pc.printf(cadena);
}
/* if(rea=='1'){
pc.printf("hola perras");
right=1;
// wait(1);
}else{
pc.printf("esperando");
right=0;
//wait(1);
// led=0;
}
if(rea=='2'){
left=1;
//wait(1);
}else{
left=0;
//wait(1);*/
}
}