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
Diff: messen/messen.cpp
- Revision:
- 12:4a4dad7a3432
- Parent:
- 7:a54c97795013
- Child:
- 13:5f0a2103c707
--- a/messen/messen.cpp Thu Aug 10 18:04:27 2017 +0000 +++ b/messen/messen.cpp Wed Aug 16 09:45:50 2017 +0000 @@ -1,6 +1,7 @@ #include "mbed.h" #include "stdio.h" + int16_t high, low; extern Serial pc(SERIAL_TX, SERIAL_RX); @@ -12,16 +13,22 @@ extern AnalogIn potis_3 (PF_4); extern AnalogIn potis_4 (PF_5); -extern DigitalIn taster1 (PG_7); -extern DigitalIn taster2 (PD_10); -extern DigitalIn taster3 (PG_14); -extern DigitalIn taster4 (PF_12); +extern PwmOut Motor1 (PC_8); // Schwarz QBRAIN: rot +extern PwmOut Motor2 (PC_9); // Weiß orange +extern PwmOut Motor3 (PC_6); // Grau weiß +extern PwmOut Motor4 (PB_9); // Blau braun + // Gelb und Orange Vcc +5V + // Gnd Rot + + + +static int n1, n2, n3, n4; /**********************/ /*Initialisieren**Gyro*/ /**********************/ -int initialisierung_gyro() +void initialisierung_gyro() { spi.format(8,0); spi.frequency(1000000); @@ -200,3 +207,5 @@ wait_us(0.1); return low | high<<8; } + +