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.
Fork of Quadrocopter by
main.cpp@6:27a09e8bebfb, 2017-08-02 (annotated)
- Committer:
- MarcoF89
- Date:
- Wed Aug 02 13:11:30 2017 +0000
- Revision:
- 6:27a09e8bebfb
- Parent:
- 4:3eaf38e4809f
- Child:
- 7:a54c97795013
Initialisierung; Auslesen der Rohdaten
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MarcoF89 | 6:27a09e8bebfb | 1 | #include "mbed.h" |
MarcoF89 | 6:27a09e8bebfb | 2 | #include "stdio.h" |
MarcoF89 | 6:27a09e8bebfb | 3 | #include <Timer.h> |
MarcoF89 | 6:27a09e8bebfb | 4 | #include "messen.h" |
MarcoF89 | 6:27a09e8bebfb | 5 | static Serial pc(SERIAL_TX, SERIAL_RX); |
MarcoF89 | 6:27a09e8bebfb | 6 | static SPI spi(PE_6,PE_5,PE_2); //mosi,miso,sclk |
MarcoF89 | 6:27a09e8bebfb | 7 | static DigitalOut ncs(PE_4); //ssel |
MarcoF89 | 6:27a09e8bebfb | 8 | |
MarcoF89 | 6:27a09e8bebfb | 9 | |
MarcoF89 | 6:27a09e8bebfb | 10 | int main() |
MarcoF89 | 6:27a09e8bebfb | 11 | { |
MarcoF89 | 6:27a09e8bebfb | 12 | initialisierung_gyro(); |
MarcoF89 | 6:27a09e8bebfb | 13 | initialisierung_acc (); |
MarcoF89 | 6:27a09e8bebfb | 14 | while(1) |
MarcoF89 | 6:27a09e8bebfb | 15 | { |
MarcoF89 | 6:27a09e8bebfb | 16 | pc.printf("\n\r"); |
MarcoF89 | 6:27a09e8bebfb | 17 | pc.printf("%ld\t%ld\t%ld\t%ld\t%ld\t%ld\t\r",aktuell_gyro_z(), aktuell_gyro_x(), aktuell_gyro_y(), aktuell_acc_x (), aktuell_acc_y (), aktuell_acc_z ()); |
MarcoF89 | 6:27a09e8bebfb | 18 | } |
MarcoF89 | 6:27a09e8bebfb | 19 | } |