version 0.1 with bugs

Dependencies:   Fingerprint

Attention, this library has a lot of bugs.... wait for 1.0 version... soon

main.cpp

Committer:
WilliamMarshQMUL
Date:
2020-01-22
Revision:
4:a2d1329d042c
Parent:
3:5b27b27e68ab
Child:
5:022e24a51359

File content as of revision 4:a2d1329d042c:

// Serial demo using mbed 5

#include "mbed.h"

DigitalOut myled(LED1);
Serial pc(USBTX, USBRX); // tx, rx

int main() {
    char c ;
    pc.printf("Enter a character>");
    while(1) {
        myled = 0;  // turn on
        c = pc.getc();
        myled = 1;  // turn off
        pc.putc(c);
        pc.putc(c); // echo twice
        pc.putc('\r');
        pc.putc('\n');
        wait(0.5);
        pc.printf("Enter a character>");
    }
}