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.
Revision 0:2f4a2a0fe4b1, committed 2014-08-28
- Comitter:
- Sarahi
- Date:
- Thu Aug 28 21:39:23 2014 +0000
- Commit message:
- :)
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Aug 28 21:39:23 2014 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+
+PwmOut PWM1(D5);
+
+void mover_servo (int tem);
+
+int main()
+{
+ PWM1.period_ms(20); //Periodo de 10 ms
+
+ while (true){
+ int t = 10;
+ mover_servo(t);
+ }
+}
+
+
+void mover_servo(int tem){
+ int pulso = tem * 25 + 1000;
+ PWM1.pulsewidth_us(pulso);
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Aug 28 21:39:23 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013 \ No newline at end of file