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:
- rgsbuap
- Date:
- 2019-10-04
- Revision:
- 26:29f649949409
- Parent:
- 25:90e7333db6a7
- Child:
- 27:eb32f100130f
File content as of revision 26:29f649949409:
#include "mbed.h"
Serial pc(USBTX,USBRX);
void funcion1(void); //Funcion sin argumento y sin regreso de dato
void funcion2(char);//Funcion con argumento y sin retorno
int main()
{
funcion1();
while (1){
char variable1;
variable1 = pc.getc();
funcion2(variable1);
}
}
void funcion1()
{ pc.printf("FUNCION SIN ARGUMENTO Y SIN RETORNO\r\n");
wait(1);
}
void funcion2(char hola)
{if(hola=='5')
{
pc.printf("variable es %c", hola);
}
else if(hola == '6')
{
pc.printf("variable es %c", hola);
}
else{
pc.printf("FUNCION CON ARGUMENTO Y SIN RETORNO\r\n");
}
wait(1); }