led matrix based on max7219 connected to nucleo-l476rg

Dependencies:   mbed MAX7219

Files at this revision

API Documentation at this revision

Comitter:
stek542
Date:
Tue Jan 21 13:46:13 2020 +0000
Commit message:
init commit

Changed in this revision

MAX7219.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MAX7219.lib	Tue Jan 21 13:46:13 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/teams/Maxim-Integrated/code/MAX7219/#b5e4379a3d90
--- /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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Jan 21 13:46:13 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file