Gedeon Nyengele / Mbed 2 deprecated FINAL_PROJECT_4180

Dependencies:   mbed

main.cpp

Committer:
nyengele
Date:
2016-04-24
Revision:
1:0e5e9821d89d
Parent:
0:f0e40bf44ffe
Child:
9:48e93bcd1d5c

File content as of revision 1:0e5e9821d89d:

#include "mbed.h"
#include "lib.h"

Serial mag_card(p13, p14);
Serial pc(USBTX, USBRX);


int main()
{
    char card_data[250];
    int bytes_read;
    int hash;

    while (true) {
        read_mag_card(&mag_card, card_data, &bytes_read);
        hash = hashcode(card_data, bytes_read);
        pc.printf("Bytes read: %d\n\rHash Code: %d\n\r", bytes_read, hash);
        wait(2);        
    }
}