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

main.cpp

Committer:
hotchpotch
Date:
2016-09-24
Revision:
0:d50f30be8280
Child:
1:81db1068fe7d

File content as of revision 0:d50f30be8280:

#include "mbed.h"
#include "Max7219.hpp"

int main() {
  SPI spi(D11 /* MOSI */, NC, D13 /* SCK */);
  MAX7219 max7219(spi, D10 /* CS */);
  max7219.begin();
  max7219.print("-1234.567");
  
  wait(5);
  double counter = 0.0f;
  char num_str[10];
  
  while(1) {
    counter += 0.01;
    sprintf(num_str, "%9.2f", counter);
    max7219.print(num_str);
  }
}