spi_number

Dependencies:   mbed

main.cpp

Committer:
ShaolinPoutine
Date:
2017-01-11
Revision:
0:87f338a4a341

File content as of revision 0:87f338a4a341:

#include "mbed.h"
 
Serial pc(USBTX, USBRX); // tx, rx
SPI spi(p5, p6, p7); // mosi, miso, sclk
DigitalOut cs(p8);
 
int main() {
    while(1){//INFINITE !!!!!!!!!!!1
    cs = 0; // chip select
    spi.write(pc.getc()); //message from keyboard
    cs = 1; //chip deselect
    } 
}