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-25
- Revision:
- 6:e57f9887ad02
- Parent:
- 5:c0d6d490dd5b
- Child:
- 7:882edb5f9466
File content as of revision 6:e57f9887ad02:
/**********************************************************************************
* 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*/
extern struct WinkelData stWinkelData;
extern struct SensData stSensData;
/* Hauptprogramm */
int main(){
while(1){
vgetSensData(&stSensData);
vcalcData(&stSensData, &stWinkelData);
//vLCDSetDebug(stSensData.wSensX,stSensData.wSensY,stSensData.wSensZ);
vLCDSet(stWinkelData.i16WinkelX, stWinkelData.i16WinkelY);
//wait_ms(1000);
}
return 0;
}