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 "mbed.h" 00002 00003 // Declaração do serial de comunicação 00004 Serial device(p9, p10); 00005 00006 int main() 00007 { 00008 device.baud(9600); 00009 00010 // Char recebido 00011 char recivedchar; 00012 00013 while (1) 00014 { 00015 if (device.readable()) 00016 { 00017 recivedchar = device.getc(); 00018 switch (recivedchar) { 00019 case 'A': 00020 device.printf("\nVocê inseriu a letra %c\n", recivedchar); 00021 break; 00022 00023 case 'B': 00024 device.printf("\nVocê inseriu a letra B\n"); 00025 break; 00026 00027 case 'C': 00028 device.printf("\nVocê inseriu a letra C\n"); 00029 break; 00030 } 00031 } 00032 else 00033 { 00034 device.printf("\nAguardando entrada...\n"); 00035 wait(3.0f); 00036 } 00037 } 00038 }
Generated on Thu Jul 21 2022 16:05:53 by
1.7.2