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:
- Schreeker
- Date:
- 2016-05-24
- Revision:
- 4:ed779bcb8ce6
- Parent:
- 3:740ab0a19e1d
- Child:
- 5:c0d6d490dd5b
File content as of revision 4:ed779bcb8ce6:
/**********************************************************************************
* 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 sWinkelData;
extern struct SensData sSensData;
/* Hauptprogramm */
int main(){
while(1){
vgetSensData(&sSensData);
vcalcData(&sSensData, &sWinkelData);
//vLCDSetDebug(sSensData.wSensX,sSensData.wSensY,sSensData.wSensZ);
vLCDSet(sWinkelData.i16WinkelX, sWinkelData.i16WinkelY);
wait_ms(500);
}
return 0;
}