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.
Diff: main.cpp
- Revision:
- 3:ad5160b8ebb5
- Parent:
- 2:fbe80f505ced
diff -r fbe80f505ced -r ad5160b8ebb5 main.cpp
--- a/main.cpp Wed May 20 12:12:00 2015 +0000
+++ b/main.cpp Tue Nov 27 10:36:23 2018 +0000
@@ -9,24 +9,24 @@
int main()
{
// Servo kalibrieren, damit er die vollen 180° verwendet.
- servo.calibrate ( 0.0009, 180.0);
+ servo.calibrate ( 0.0009, 360.0);
- while ( 1 )
+ while ( 0 )
{
// Servo langsam bewegen (immer in der Mitte Anfangen mit Tests, sonst besteht die Gefahr von Schäden)
- for ( float p = 0.2f; p <= 0.8f; p += 0.0001f )
+ for ( float p = 0.9f; p <= 1.8f; p += 0.1f )
{
servo = p;
- wait(0.001);
+ wait(0.00001);
}
- wait( 1.0 );
+ wait( 0.5 );
// und die andere Seite
- for ( float p = 0.8f; p >= 0.2f; p -= 0.0001f )
+ for ( float p = 1.8f; p >= 1.2f; p -= 1.1f )
{
servo = p;
wait(0.001);
}
- wait( 1.0 );
+ wait( 0.5 );
}
}
\ No newline at end of file