Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- NilsKemmer
- Date:
- 2016-05-23
- Revision:
- 2:cf8b98404b66
- Parent:
- 0:2a6b63a19ae5
- Child:
- 3:740ab0a19e1d
File content as of revision 2:cf8b98404b66:
/**********************************************************************************
* File name: main.cpp
* Zweck: Beinhaltet das Hauptprogramm. Es werden zyklisch die Daten des Be-
schleunigungssensores ausgelesen, umgerechnet in Winkel, LED auf
Basis der X-,Y- und Z-Winkel angesteuert und die Winkel auf dem
LCD-Display angezeigt.
* Author: Simon Rutzen, Nils Kemmer
* Changes: keine
***********************************************************************************/
/* Includes */
#include "mbed.h"
#include "LCD.h"
#include "cdef.h"
#include "Sensor.h"
/*Structs*/
/*Struktur zum Speichern der umgerechneten Messdaten von SensData*/
struct WinkelData{
signed short int i16WinkelX;
signed short int i16WinkelY;
signed short int i16WinkelZ;
} sWinkelData;
extern struct SensData sSensData;
/* Hauptprogramm */
int main(){
while(1){
vgetSensData(&sSensData);
vLCDSetDebug(sSensData.wSensX,sSensData.wSensY,sSensData.wSensZ);
wait_ms(500);
}
return 0;
}