Send data with SPI.

Dependencies:   mbed

main.cpp

Committer:
arostm
Date:
22 months ago
Revision:
1:e6112104a80f
Parent:
0:21b36798fd00

File content as of revision 1:e6112104a80f:

#include "mbed.h"
 
SPI device(SPI_MOSI, SPI_MISO, SPI_SCK);
 
int main() {
    int i = 0;
    while(1) {
        device.write(0x55);
        device.write(i++);
        device.write(0xE0);
        wait_us(50);
    }
}