Ejemplo para ver com,unicacion SPI simple

Dependencies:   mbed Max7219

Ejemplo de blog en repositorio

https://os.mbed.com/media/uploads/lscordovar/whatsapp_image_2020-02-05_at_16.43.29.jpeg

ejemplo de imagen subida

Committer:
hotchpotch
Date:
Sat Sep 24 08:22:08 2016 +0000
Revision:
0:d50f30be8280
Child:
1:81db1068fe7d
init

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hotchpotch 0:d50f30be8280 1 #include "mbed.h"
hotchpotch 0:d50f30be8280 2 #include "Max7219.hpp"
hotchpotch 0:d50f30be8280 3
hotchpotch 0:d50f30be8280 4 int main() {
hotchpotch 0:d50f30be8280 5 SPI spi(D11 /* MOSI */, NC, D13 /* SCK */);
hotchpotch 0:d50f30be8280 6 MAX7219 max7219(spi, D10 /* CS */);
hotchpotch 0:d50f30be8280 7 max7219.begin();
hotchpotch 0:d50f30be8280 8 max7219.print("-1234.567");
hotchpotch 0:d50f30be8280 9
hotchpotch 0:d50f30be8280 10 wait(5);
hotchpotch 0:d50f30be8280 11 double counter = 0.0f;
hotchpotch 0:d50f30be8280 12 char num_str[10];
hotchpotch 0:d50f30be8280 13
hotchpotch 0:d50f30be8280 14 while(1) {
hotchpotch 0:d50f30be8280 15 counter += 0.01;
hotchpotch 0:d50f30be8280 16 sprintf(num_str, "%9.2f", counter);
hotchpotch 0:d50f30be8280 17 max7219.print(num_str);
hotchpotch 0:d50f30be8280 18 }
hotchpotch 0:d50f30be8280 19 }