test bench
/
led_matrix_smile
led matrix based on max7219 connected to nucleo-l476rg
main.cpp
- Committer:
- stek542
- Date:
- 2020-01-21
- Revision:
- 0:f11d86c27d4c
File content as of revision 0:f11d86c27d4c:
#include "max7219.h" Max7219 max7219(D11, NC, D13, D10); //DigitalOut my_sck(D13); int main() { max7219_configuration_t cfg = { .device_number = 1, .decode_mode = 0, .intensity = Max7219::MAX7219_INTENSITY_3, .scan_limit = Max7219::MAX7219_SCAN_8 }; max7219.init_device(cfg); max7219.enable_device(1); max7219.write_digit(1,1,0b00111100); max7219.write_digit(1,2,0b01000010); max7219.write_digit(1,3,0b10000001); max7219.write_digit(1,4,0b10100101); max7219.write_digit(1,5,0b10000001); max7219.write_digit(1,6,0b10100101); max7219.write_digit(1,7,0b01011010); max7219.write_digit(1,8,0b00111100); while (1) { } }