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:
- marcel1691
- Date:
- 2015-03-23
- Revision:
- 0:e6f25efb6af9
- Child:
- 1:32f0eb92121b
File content as of revision 0:e6f25efb6af9:
/** Servo */ #include "mbed.h" #include "Servo.h" Servo servo(A5); int main() { 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 ) { servo = p; wait(0.001); } wait( 1.0 ); // und die andere Seite for ( float p = 0.6f; p >= 0.4f; p -= 0.0001f ) { servo = p; wait(0.001); } wait( 1.0 ); } }