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:
- 2:fbe80f505ced
- Parent:
- 1:32f0eb92121b
- Child:
- 3:ad5160b8ebb5
--- a/main.cpp Wed Mar 25 12:03:02 2015 +0000
+++ b/main.cpp Wed May 20 12:12:00 2015 +0000
@@ -8,17 +8,20 @@
int main()
{
+ // Servo kalibrieren, damit er die vollen 180° verwendet.
+ servo.calibrate ( 0.0009, 180.0);
+
while ( 1 )
{
// Servo langsam bewegen (immer in der Mitte Anfangen mit Tests, sonst besteht die Gefahr von Schäden)
- for ( float p = 0.4f; p < 0.6f; p += 0.0001f )
+ for ( float p = 0.2f; p <= 0.8f; p += 0.0001f )
{
servo = p;
wait(0.001);
}
wait( 1.0 );
// und die andere Seite
- for ( float p = 0.6f; p >= 0.4f; p -= 0.0001f )
+ for ( float p = 0.8f; p >= 0.2f; p -= 0.0001f )
{
servo = p;
wait(0.001);