EMSY-Projekt / Mbed 2 deprecated EMSY-Projekt_Lagesensor

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
Schreeker
Date:
Thu Jun 30 18:56:35 2016 +0000
Parent:
13:676721490d37
Child:
15:462c8c89fe35
Commit message:
initLCD hinzugef?gt (Introtext bei Programmstart auf Display). Kalibrierung ueberprueft. Alles ok. Simon Rutzen Ausstehend: Einstellen der LED's durch Auswertung der Winkel!

Changed in this revision

LCD.cpp Show annotated file Show diff for this revision Revisions of this file
LCD.h 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
--- a/LCD.cpp	Thu Jun 30 13:55:56 2016 +0000
+++ b/LCD.cpp	Thu Jun 30 18:56:35 2016 +0000
@@ -56,4 +56,24 @@
     olcd.printf("X:%i Y:%i",wWinkelX,wWinkelY);   
     olcd.locate(0,1);
     olcd.printf("Z:%i",wWinkelZ); 
+    }
+    
+/************************************************************************************
+* void initLCD()
+* Zweck:    Anzeigen des Initialtextes zum Programmstart.
+* Parameter:
+    keine
+* return Parameter:
+    keine
+*************************************************************************************/    
+void initLCD(){
+    /* Löschen des Bildschirmes */
+    olcd.cls();
+    
+    /* Anzeigen des Initialtextes */
+    olcd.locate(3,0);
+    olcd.printf("Lagesensor");
+    
+    olcd.locate(1,1);
+    olcd.printf("Nils und Simon");
     }
\ No newline at end of file
--- a/LCD.h	Thu Jun 30 13:55:56 2016 +0000
+++ b/LCD.h	Thu Jun 30 18:56:35 2016 +0000
@@ -12,4 +12,5 @@
 
 /* Prototypen */
 void vLCDSet(signed short int wWinkelX, signed short int wWinkelY);
-void vLCDDebug(signed short int wWinkelX, signed short int wWinkelY, signed short int wWinkelZ);
\ No newline at end of file
+void vLCDDebug(signed short int wWinkelX, signed short int wWinkelY, signed short int wWinkelZ);
+void initLCD();
\ No newline at end of file
--- a/main.cpp	Thu Jun 30 13:55:56 2016 +0000
+++ b/main.cpp	Thu Jun 30 18:56:35 2016 +0000
@@ -21,7 +21,8 @@
 
 /* Hauptprogramm */
 int main(){
-    /* Blinken der LED's zum Start (Hello) */
+    /* Initialisierung (LCD Anzeige + Blinkende LED's */
+    initLCD();
     initLED();
     
     while(1){
@@ -29,17 +30,17 @@
         vgetSensData(&stSensData);
         
         /* Berechnung der Spannungswerte aus den Messdaten für Debugzwecke */
-        vDebugData(&stSensData, &stWinkelData);
+        //vDebugData(&stSensData, &stWinkelData);
         
         /* Berechnung der Winkel aus Messdaten */
-        //vcalcData(&stSensData, &stWinkelData);
+        vcalcData(&stSensData, &stWinkelData);
         
         /* Einstellen der LED's*/
         // Tbd
         
         /* Einstellen des LCD-Displays*/
-        //vLCDSet(stWinkelData.i16WinkelX, stWinkelData.i16WinkelY);
-        vLCDDebug(stWinkelData.i16WinkelX, stWinkelData.i16WinkelY, stWinkelData.i16WinkelZ);
+        vLCDSet(stWinkelData.i16WinkelX, stWinkelData.i16WinkelY);
+        //vLCDDebug(stWinkelData.i16WinkelX, stWinkelData.i16WinkelY, stWinkelData.i16WinkelZ);
         /* Pause */
         wait_ms(250);
         }