splash screen and pulse working

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
raduschirila
Date:
Fri Feb 02 11:54:14 2018 +0000
Parent:
0:850d65a7d593
Commit message:
processed pulse (non-PID version) ready for display. Need more work on which bits to change to make the display obey. Might need to rotate everything 90deg to make it easier in terms of mcu processing

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Jan 31 14:49:42 2018 +0000
+++ b/main.cpp	Fri Feb 02 11:54:14 2018 +0000
@@ -40,14 +40,10 @@
 
 
 char  heart[8] = {0x00,0x36,0x7f,0x7f,0x3e,0x1c,0x08,0x00};
-char  pattern_square[8] = { 0xff, 0x81,0x81,0x81,0x81,0x81,0x81,0xff};  
-char  pattern_star[8] = { 0x04, 0x15, 0x0e, 0x1f, 0x0e, 0x15, 0x04, 0x00};
 
 
-/*
-Write to the maxim via SPI
-args register and the column data
-*/
+//DISPLAY FUNCTIONS DO NOT TOUCH
+
 void write_to_max( int reg, int col)
 {
     load = LOW;            // begin
@@ -94,12 +90,12 @@
         write_to_max(e,0);
     }
 }
-int main()
+
+//END OF DISPLAY FUNCTIONS
+
+void splash_screen()
 {
-    pulse.attach(&get_pulse,0.125);
     setup_dot_matrix ();      /* setup matric */
-    while(1){
-    //da_star();
     pattern_to_display(heart);
     wait_ms(1000);
     heart[7]=0x01;heart[0]=0x01;
@@ -119,4 +115,12 @@
     wait(1.6);
     clear();
 }
-}
\ No newline at end of file
+
+int main()
+{
+    pulse.attach(&get_pulse,0.125);
+    splash_screen();
+    while(1)
+    {
+    }
+}