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.
Dependencies: mbed
Revision 2:042ea0741254, committed 2022-07-26
- Comitter:
- qwertyaz
- Date:
- Tue Jul 26 02:52:56 2022 +0000
- Parent:
- 1:a636d553c70a
- Commit message:
- test
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Jul 21 13:46:47 2022 +0000
+++ b/main.cpp Tue Jul 26 02:52:56 2022 +0000
@@ -2,10 +2,10 @@
#include "CAN_com.h"
#include "structs.h"
-#define PULSE_MAX 2450 // us
-#define PULSE_MIN 550 //us
+#define PULSE_MAX 2400 // us
+#define PULSE_MIN 600 //us
#define PERIOD 20 // us
-#define POS_MAX 3.14159265359f // rad
+#define POS_MAX 3.14159265359f // radx
#define POS_MIN 0.0f // rad
#define M_PI 3.14159265359f // rad
@@ -18,8 +18,8 @@
PwmOut led_blue(PB_4);
PwmOut led_red(PB_5);
-PwmOut servo1(PA_1);
-PwmOut servo2(PA_3);
+PwmOut servo1(PA_3);
+PwmOut servo2(PA_1);
ControllerStruct controller;
@@ -36,7 +36,6 @@
servo1.period_ms(PERIOD);
servo2.period_ms(PERIOD);
-
while(1) {
if (received == true){
double gripper_pos = controller.p_des;