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: function.h
- Revision:
- 1:3d05c0de31ae
- Child:
- 2:95555e722c03
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/function.h Mon Aug 22 07:26:20 2016 +0000
@@ -0,0 +1,77 @@
+
+
+
+
+void close_hand(void) {
+ PwmOut mypwm(PB_3);
+ int i,degree;
+
+ mypwm.period_ms(20); //20ms
+
+ degree=0;
+
+ i=500+degree*1900/180;
+ mypwm.pulsewidth_us(i);
+
+
+}
+
+void close_arm(void) {
+ PwmOut mypwm(PB_3);
+ int i,degree;
+
+ mypwm.period_ms(20); //20ms
+
+ degree=0;
+
+ i=500+degree*1900/180;
+ mypwm.pulsewidth_us(i);
+
+
+}
+
+
+
+void open_hand(void) {
+ PwmOut mypwm(PWM_OUT);
+ int i,degree;
+
+ mypwm.period_ms(20); //20ms
+
+ degree=180;
+
+ i=500+degree*1900/180;
+ mypwm.pulsewidth_us(i);
+
+
+}
+
+
+
+void open_arm(void) {
+ PwmOut mypwm(PWM_OUT);
+ int i,degree;
+
+ mypwm.period_ms(20); //20ms
+
+ degree=180;
+
+ i=500+degree*1900/180;
+ mypwm.pulsewidth_us(i);
+
+
+}
+
+void lift(void) {
+ PwmOut mypwm(PWM_OUT);
+ int i,degree;
+
+ mypwm.period_ms(20); //20ms
+
+ degree=180;
+
+ i=500+degree*1900/180;
+ mypwm.pulsewidth_us(i);
+
+
+}
\ No newline at end of file