Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "mbed.h"
- DigitalOut myled(LED1);
- // USB serial (tx, rx)
- Serial pc(USBTX, USBRX);
- int main() {
- char dado;
- pc.printf("Comunicacao Serial\n\r");
- while(1) {
- if(pc.readable()){
- dado = pc.getc();
- pc.printf("%c", dado);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment