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:
- CHRISTIAN_GSL
- Date:
- 2020-08-04
- Revision:
- 0:4b02ac4bd3dd
File content as of revision 0:4b02ac4bd3dd:
#include "mbed.h"
Serial pc(USBTX, USBRX); // tx, rx
DigitalOut led_rojo(LED_RED);
DigitalOut led_verde(LED_GREEN);
DigitalOut led_azul(LED_BLUE);
int main()
{
pc.printf("Presione 'H' para encender LED1 o 'L' para apagarlo\n");
while(1)
{
char c = pc.getc();
if(c == 'H')
{
led_rojo=0;
led_verde=0;
led_azul=0;
}
if(c == 'L')
{
led_rojo=1;
led_verde=1;
led_azul=1;
}
}
}