test bench
/
led_matrix_smile
led matrix based on max7219 connected to nucleo-l476rg
Diff: main.cpp
- Revision:
- 0:f11d86c27d4c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Jan 21 13:46:13 2020 +0000 @@ -0,0 +1,33 @@ +#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) { + + + } +} \ No newline at end of file