1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668
|
#include <Servo.h> #include <EEPROM.h> #include <ESP8266WiFi.h> #include <ESP8266WebServer.h> #include <Adafruit_PWMServoDriver.h>
Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();
String FW_Version = "Robot-J mini - Quadruped Robot v1.5 (Designed by August)";
const int ALLMATRIX = 9; const int ALLSERVOS = 8;
const int PWMRES_Min = 1; const int PWMRES_Max = 180; const int SERVOMIN = 150; const int SERVOMAX = 600;
int servo_id;
const int BASEDELAYTIME = 10;
const char WiFiAPPSK[] = "12345678";
int Servo_PROGRAM;
int Running_Servo_POS [ALLMATRIX];
ESP8266WebServer server(80);
const int Servo_Map[ALLSERVOS] = {3, 2, 13, 12, 0, 1, 14, 15};
int Servo_Act_0 [ ] PROGMEM = { 135, 45, 135, 45, 45, 135, 45, 135, 500 };
int Servo_Act_1 [ ] PROGMEM = { 135, 45, 135, 45, 45, 135, 45, 135, 500 };
int Servo_Prg_1_Step = 2; int Servo_Prg_1 [][ALLMATRIX] PROGMEM = { { 90, 90, 90, 90, 90, 90, 90, 90, 500 }, { 70, 90, 90, 110, 110, 90, 90, 70, 500 }, };
int Servo_Prg_2_Step = 11; int Servo_Prg_2 [][ALLMATRIX] PROGMEM = { { 70, 90, 90, 110, 110, 90, 90, 70, 200 }, { 90, 90, 90, 110, 110, 90, 45, 90, 200 }, { 70, 90, 90, 110, 110, 90, 45, 70, 200 }, { 70, 90, 90, 90, 90, 90, 45, 70, 200 }, { 70, 45, 135, 90, 90, 90, 90, 70, 200 }, { 70, 45, 135, 110, 110, 90, 90, 70, 200 }, { 90, 90, 135, 110, 110, 90, 90, 90, 200 }, { 90, 90, 90, 110, 110, 135, 90, 90, 200 }, { 70, 90, 90, 110, 110, 135, 90, 70, 200 }, { 70, 90, 90, 110, 90, 135, 90, 70, 200 }, { 70, 90, 90, 110, 110, 90, 90, 70, 200 }, };
int Servo_Prg_3_Step = 11; int Servo_Prg_3 [][ALLMATRIX] PROGMEM = { { 70, 90, 90, 110, 110, 90, 90, 70, 200 }, { 90, 45, 90, 110, 110, 90, 90, 90, 200 }, { 70, 45, 90, 110, 110, 90, 90, 70, 200 }, { 70, 45, 90, 90, 90, 90, 90, 70, 200 }, { 70, 90, 90, 90, 90, 135, 45, 70, 200 }, { 70, 90, 90, 110, 110, 135, 45, 70, 200 }, { 90, 90, 90, 110, 110, 135, 90, 90, 200 }, { 90, 90, 135, 110, 110, 90, 90, 90, 200 }, { 70, 90, 135, 110, 110, 90, 90, 70, 200 }, { 70, 90, 135, 90, 110, 90, 90, 70, 200 }, { 70, 90, 90, 110, 110, 90, 90, 70, 200 }, };
int Servo_Prg_4_Step = 11; int Servo_Prg_4 [][ALLMATRIX] PROGMEM = { { 70, 90, 90, 110, 110, 90, 90, 70, 200 }, { 70, 90, 45, 90, 90, 90, 90, 70, 200 }, { 70, 90, 45, 110, 110, 90, 90, 70, 200 }, { 90, 90, 45, 110, 110, 90, 90, 90, 200 }, { 90, 135, 90, 110, 110, 45, 90, 90, 200 }, { 70, 135, 90, 110, 110, 45, 90, 70, 200 }, { 70, 135, 90, 90, 90, 90, 90, 70, 200 }, { 70, 90, 90, 90, 90, 90, 135, 70, 200 }, { 70, 90, 90, 110, 110, 90, 135, 70, 200 }, { 70, 90, 90, 110, 110, 90, 135, 90, 200 }, { 70, 90, 90, 110, 110, 90, 90, 70, 200 }, };
int Servo_Prg_5_Step = 11; int Servo_Prg_5 [][ALLMATRIX] PROGMEM = { { 70, 90, 90, 110, 110, 90, 90, 70, 200 }, { 70, 90, 90, 90, 90, 45, 90, 70, 200 }, { 70, 90, 90, 110, 110, 45, 90, 70, 200 }, { 90, 90, 90, 110, 110, 45, 90, 90, 200 }, { 90, 90, 45, 110, 110, 90, 135, 90, 200 }, { 70, 90, 45, 110, 110, 90, 135, 70, 200 }, { 70, 90, 90, 90, 90, 90, 135, 70, 200 }, { 70, 135, 90, 90, 90, 90, 90, 70, 200 }, { 70, 135, 90, 110, 110, 90, 90, 70, 200 }, { 90, 135, 90, 110, 110, 90, 90, 70, 200 }, { 70, 90, 90, 110, 110, 90, 90, 70, 200 }, };
int Servo_Prg_6_Step = 8; int Servo_Prg_6 [][ALLMATRIX] PROGMEM = { { 70, 90, 90, 110, 110, 90, 90, 70, 200 }, { 90, 90, 90, 110, 110, 90, 90, 90, 200 }, { 90, 135, 90, 110, 110, 90, 135, 90, 200 }, { 70, 135, 90, 110, 110, 90, 135, 70, 200 }, { 70, 135, 90, 90, 90, 90, 135, 70, 200 }, { 70, 135, 135, 90, 90, 135, 135, 70, 200 }, { 70, 135, 135, 110, 110, 135, 135, 70, 200 }, { 70, 90, 90, 110, 110, 90, 90, 70, 200 }, };
int Servo_Prg_7_Step = 8; int Servo_Prg_7 [][ALLMATRIX] PROGMEM = { { 70, 90, 90, 110, 110, 90, 90, 70, 200 }, { 70, 90, 90, 90, 90, 90, 90, 70, 200 }, { 70, 90, 45, 90, 90, 45, 90, 70, 200 }, { 70, 90, 45, 110, 110, 45, 90, 70, 200 }, { 90, 90, 45, 110, 110, 45, 90, 90, 200 }, { 90, 45, 45, 110, 110, 45, 45, 90, 200 }, { 70, 45, 45, 110, 110, 45, 45, 70, 200 }, { 70, 90, 90, 110, 110, 90, 90, 70, 200 }, };
int Servo_Prg_8_Step = 1; int Servo_Prg_8 [][ALLMATRIX] PROGMEM = { { 110, 90, 90, 70, 70, 90, 90, 110, 500 }, };
int Servo_Prg_9_Step = 7; int Servo_Prg_9 [][ALLMATRIX] PROGMEM = { { 70, 90, 90, 90, 90, 90, 90, 90, 400}, { 170, 90, 90, 90, 90, 90, 90, 90, 400}, { 170, 130, 90, 90, 90, 90, 90, 90, 400}, { 170, 50, 90, 90, 90, 90, 90, 90, 400}, { 170, 130, 90, 90, 90, 90, 90, 90, 400}, { 170, 90, 90, 90, 90, 90, 90, 90, 400}, { 70, 90, 90, 90, 90, 90, 90, 90, 400}, };
int Servo_Prg_10_Step = 11; int Servo_Prg_10 [][ALLMATRIX] PROGMEM = { { 120, 90, 90, 110, 60, 90, 90, 70, 500 }, { 120, 70, 70, 110, 60, 70, 70, 70, 500 }, { 120, 110, 110, 110, 60, 110, 110, 70, 500 }, { 120, 70, 70, 110, 60, 70, 70, 70, 500 }, { 120, 110, 110, 110, 60, 110, 110, 70, 500 }, { 70, 90, 90, 70, 110, 90, 90, 110, 500 }, { 70, 70, 70, 70, 110, 70, 70, 110, 500 }, { 70, 110, 110, 70, 110, 110, 110, 110, 500 }, { 70, 70, 70, 70, 110, 70, 70, 110, 500 }, { 70, 110, 110, 70, 110, 110, 110, 110, 500 }, { 70, 90, 90, 70, 110, 90, 90, 110, 500 } };
int Servo_Prg_11_Step = 11; int Servo_Prg_11 [][ALLMATRIX] PROGMEM = { { 70, 90, 90, 110, 110, 90, 90, 70, 500 }, { 100, 90, 90, 80, 80, 90, 90, 100, 600 }, { 70, 90, 90, 110, 110, 90, 90, 70, 700 }, { 100, 90, 90, 80, 80, 90, 90, 100, 800 }, { 70, 90, 90, 110, 110, 90, 90, 70, 900 }, { 100, 90, 90, 80, 80, 90, 90, 100, 1500 }, { 70, 90, 90, 110, 110, 90, 90, 70, 2000 }, { 135, 90, 90, 45, 45, 90, 90, 135, 200 }, { 70, 90, 90, 45, 60, 90, 90, 135, 800 }, { 70, 90, 90, 45, 110, 90, 90, 135, 800 }, { 70, 90, 90, 110, 110, 90, 90, 70, 800 } };
int Servo_Prg_12_Step = 2; int Servo_Prg_12 [][ALLMATRIX] PROGMEM = { { 30, 90, 90, 150, 150, 90, 90, 30, 500 }, { 30, 45, 135, 150, 150, 135, 45, 30, 500 }, };
int Servo_Prg_13_Step = 10; int Servo_Prg_13 [][ALLMATRIX] PROGMEM = { { 90, 90, 90, 90, 90, 90, 90, 90, 400 }, { 50, 90, 90, 90, 90, 90, 90, 90, 400 }, { 90, 90, 90, 130, 90, 90, 90, 90, 400 }, { 90, 90, 90, 90, 90, 90, 90, 50, 400 }, { 90, 90, 90, 90, 130, 90, 90, 90, 400 }, { 50, 90, 90, 90, 90, 90, 90, 90, 400 }, { 90, 90, 90, 130, 90, 90, 90, 90, 400 }, { 90, 90, 90, 90, 90, 90, 90, 50, 400 }, { 90, 90, 90, 90, 130, 90, 90, 90, 400 }, { 90, 90, 90, 90, 90, 90, 90, 90, 400 }, };
int Servo_Prg_14_Step = 9; int Servo_Prg_14 [][ALLMATRIX] PROGMEM = { { 70, 45, 135, 110, 110, 135, 45, 70, 400 }, { 115, 45, 135, 65, 110, 135, 45, 70, 400 }, { 70, 45, 135, 110, 65, 135, 45, 115, 400 }, { 115, 45, 135, 65, 110, 135, 45, 70, 400 }, { 70, 45, 135, 110, 65, 135, 45, 115, 400 }, { 115, 45, 135, 65, 110, 135, 45, 70, 400 }, { 70, 45, 135, 110, 65, 135, 45, 115, 400 }, { 115, 45, 135, 65, 110, 135, 45, 70, 400 }, { 75, 45, 135, 105, 110, 135, 45, 70, 400 }, };
int Servo_Prg_15_Step = 10; int Servo_Prg_15 [][ALLMATRIX] PROGMEM = { { 70, 45, 45, 110, 110, 135, 135, 70, 400 }, { 110, 45, 45, 60, 70, 135, 135, 70, 400 }, { 70, 45, 45, 110, 110, 135, 135, 70, 400 }, { 110, 45, 45, 110, 70, 135, 135, 120, 400 }, { 70, 45, 45, 110, 110, 135, 135, 70, 400 }, { 110, 45, 45, 60, 70, 135, 135, 70, 400 }, { 70, 45, 45, 110, 110, 135, 135, 70, 400 }, { 110, 45, 45, 110, 70, 135, 135, 120, 400 }, { 70, 45, 45, 110, 110, 135, 135, 70, 400 }, { 70, 90, 90, 110, 110, 90, 90, 70, 400 }, };
void Set_PWM_to_Servo(int iServo, int iValue) { int NewPWM = iValue + (int8_t)EEPROM.read(iServo);
NewPWM = map(NewPWM, PWMRES_Min, PWMRES_Max, SERVOMIN, SERVOMAX); pwm.setPWM(Servo_Map[iServo], 0, NewPWM); }
void Servo_PROGRAM_Zero() { for (int Index = 0; Index < ALLMATRIX; Index++) { Running_Servo_POS[Index] = Servo_Act_0[Index]; }
for (int iServo = 0; iServo < ALLSERVOS; iServo++) { Set_PWM_to_Servo(iServo, Running_Servo_POS[iServo]); delay(10); } }
void Servo_PROGRAM_Center() { for (int Index = 0; Index < ALLMATRIX; Index++) { Running_Servo_POS[Index] = Servo_Act_1[Index]; }
for (int iServo = 0; iServo < ALLSERVOS; iServo++) { Set_PWM_to_Servo(iServo, Running_Servo_POS[iServo]); delay(10); } }
void Servo_PROGRAM_Run(int iMatrix[][ALLMATRIX], int iSteps) { int INT_TEMP_A, INT_TEMP_B, INT_TEMP_C;
for (int MainLoopIndex = 0; MainLoopIndex < iSteps; MainLoopIndex++) {
int InterTotalTime = iMatrix[MainLoopIndex][ALLMATRIX - 1];
int InterDelayCounter = InterTotalTime / BASEDELAYTIME;
for (int InterStepLoop = 0; InterStepLoop < InterDelayCounter; InterStepLoop++) {
for (int ServoIndex = 0; ServoIndex < ALLSERVOS; ServoIndex++) {
INT_TEMP_A = Running_Servo_POS[ServoIndex]; INT_TEMP_B = iMatrix[MainLoopIndex][ServoIndex];
if (INT_TEMP_A == INT_TEMP_B) { INT_TEMP_C = INT_TEMP_B; } else if (INT_TEMP_A > INT_TEMP_B) { INT_TEMP_C = map(BASEDELAYTIME * InterStepLoop, 0, InterTotalTime, 0, INT_TEMP_A - INT_TEMP_B); if (INT_TEMP_A - INT_TEMP_C >= INT_TEMP_B) { Set_PWM_to_Servo(ServoIndex, INT_TEMP_A - INT_TEMP_C); } } else if (INT_TEMP_A < INT_TEMP_B) { INT_TEMP_C = map(BASEDELAYTIME * InterStepLoop, 0, InterTotalTime, 0, INT_TEMP_B - INT_TEMP_A); if (INT_TEMP_A + INT_TEMP_C <= INT_TEMP_B) { Set_PWM_to_Servo(ServoIndex, INT_TEMP_A + INT_TEMP_C); } }
}
delay(BASEDELAYTIME); }
for (int Index = 0; Index < ALLMATRIX; Index++) { Running_Servo_POS[Index] = iMatrix[MainLoopIndex][Index]; } } }
void writeKeyValue(int8_t key, int8_t value) { EEPROM.write(key, value); EEPROM.commit(); }
int8_t readKeyValue(int8_t key) { Serial.println("read"); Serial.println(key);
int8_t value = EEPROM.read(key); }
void handleAction(WiFiClient client, String req, HTTPMethod method) { server.send(200, "text/plain", "Hello!"); }
void handleSave() { String key = server.arg("key"); String value = server.arg("value");
int8_t keyInt = key.toInt(); int8_t valueInt = value.toInt();
delay(50);
if (keyInt == 100) { writeKeyValue(0, 0); writeKeyValue(1, 0); writeKeyValue(2, 0); writeKeyValue(3, 0); writeKeyValue(4, 0); writeKeyValue(5, 0); writeKeyValue(6, 0); writeKeyValue(7, 0); } else { if (valueInt >= -124 && valueInt <= 124) { writeKeyValue(keyInt, valueInt); } } delay(10);
server.send(200, "text/html", "(key, value)=(" + key + "," + value + ")"); }
void handleController() { String pm = server.arg("pm"); String servo = server.arg("servo");
if (pm != "") { Servo_PROGRAM = pm.toInt(); }
if (servo != "") { servo_id = servo.toInt(); String ival = server.arg("value"); Set_PWM_to_Servo(servo_id, ival.toInt()); }
server.send(200, "text/html", "(pm)=(" + pm + ")"); }
void handleOnLine() { String m0 = server.arg("m0"); String m1 = server.arg("m1"); String m2 = server.arg("m2"); String m3 = server.arg("m3"); String m4 = server.arg("m4"); String m5 = server.arg("m5"); String m6 = server.arg("m6"); String m7 = server.arg("m7"); String t1 = server.arg("t1");
int Servo_Prg_tmp [][ALLMATRIX] = { { m0.toInt(), m1.toInt(), m2.toInt(), m3.toInt(), m4.toInt(), m5.toInt(), m6.toInt(), m7.toInt(), t1.toInt() } };
Servo_PROGRAM_Run(Servo_Prg_tmp, 1);
server.send(200, "text/html", "(m0, m1)=(" + m0 + "," + m1 + ")"); }
void enableWebServer() { HTTPMethod getMethod = HTTP_GET;
server.on("/controller", getMethod, handleController); server.on("/save", getMethod, handleSave); server.on("/", getMethod, handleIndex); server.on("/editor", getMethod, handleEditor); server.on("/zero", getMethod, handleZero); server.on("/setting", getMethod, handleSetting); server.on("/online", getMethod, handleOnLine);
server.begin(); }
void setup(void) { Serial.begin(115200); Serial.println("Robot-J mini Start!");
pwm.begin(); pwm.setPWMFreq(60); uint8_t mac[WL_MAC_ADDR_LENGTH]; WiFi.softAPmacAddress(mac); String macID = String(mac[WL_MAC_ADDR_LENGTH - 2], HEX) + String(mac[WL_MAC_ADDR_LENGTH - 1], HEX); macID.toUpperCase();
String AP_NameString = "Robot-J mini - " + macID;
char AP_NameChar[AP_NameString.length() + 1]; memset(AP_NameChar, 0, AP_NameString.length() + 1);
for (int i = 0; i < AP_NameString.length(); i++) AP_NameChar[i] = AP_NameString.charAt(i); WiFi.mode(WIFI_AP); WiFi.softAP(AP_NameChar, WiFiAPPSK); IPAddress myIP = WiFi.softAPIP();
EEPROM.begin(512); delay(10);
for (int Index = 0; Index < ALLMATRIX; Index++) { Running_Servo_POS[Index] = Servo_Act_0[Index]; }
Servo_PROGRAM_Zero();
enableWebServer(); }
void loop(void) { server.handleClient();
if (Servo_PROGRAM >= 1 ) { switch (Servo_PROGRAM) { case 1: Servo_PROGRAM_Run(Servo_Prg_1, Servo_Prg_1_Step); break; case 2: Servo_PROGRAM_Run(Servo_Prg_2, Servo_Prg_2_Step); break; case 3: Servo_PROGRAM_Run(Servo_Prg_3, Servo_Prg_3_Step); break; case 4: Servo_PROGRAM_Run(Servo_Prg_4, Servo_Prg_4_Step); break; case 5: Servo_PROGRAM_Run(Servo_Prg_5, Servo_Prg_5_Step); break; case 6: Servo_PROGRAM_Run(Servo_Prg_6, Servo_Prg_6_Step); break; case 7: Servo_PROGRAM_Run(Servo_Prg_7, Servo_Prg_7_Step); break; case 8: Servo_PROGRAM_Run(Servo_Prg_8, Servo_Prg_8_Step); break; case 9: Servo_PROGRAM_Run(Servo_Prg_9, Servo_Prg_9_Step); Servo_PROGRAM_Run(Servo_Prg_1, Servo_Prg_1_Step); break; case 10: Servo_PROGRAM_Run(Servo_Prg_10, Servo_Prg_10_Step); break; case 11: Servo_PROGRAM_Run(Servo_Prg_11, Servo_Prg_11_Step); break; case 12: Servo_PROGRAM_Run(Servo_Prg_1, Servo_Prg_1_Step); Servo_PROGRAM_Run(Servo_Prg_12, Servo_Prg_12_Step); break; case 13: Servo_PROGRAM_Run(Servo_Prg_13, Servo_Prg_13_Step); break; case 14: Servo_PROGRAM_Run(Servo_Prg_14, Servo_Prg_14_Step); break; case 15: Servo_PROGRAM_Run(Servo_Prg_15, Servo_Prg_15_Step); break; case 99: Servo_PROGRAM_Center(); delay(300); break; case 100: Servo_PROGRAM_Zero(); delay(300); case 101: Servo_PROGRAM_Run(Servo_Prg_1, Servo_Prg_1_Step); Servo_PROGRAM_Center(); delay(1000); Servo_PROGRAM_Run(Servo_Prg_2, Servo_Prg_2_Step); Servo_PROGRAM_Center(); delay(1000); Servo_PROGRAM_Run(Servo_Prg_3, Servo_Prg_3_Step); Servo_PROGRAM_Center(); delay(1000); Servo_PROGRAM_Run(Servo_Prg_4, Servo_Prg_4_Step); Servo_PROGRAM_Center(); delay(1000); Servo_PROGRAM_Run(Servo_Prg_5, Servo_Prg_5_Step); Servo_PROGRAM_Center(); delay(1000); Servo_PROGRAM_Run(Servo_Prg_6, Servo_Prg_6_Step); Servo_PROGRAM_Center(); delay(1000); Servo_PROGRAM_Run(Servo_Prg_7, Servo_Prg_7_Step); Servo_PROGRAM_Center(); delay(1000); Servo_PROGRAM_Run(Servo_Prg_8, Servo_Prg_8_Step); Servo_PROGRAM_Center(); delay(1000); Servo_PROGRAM_Run(Servo_Prg_9, Servo_Prg_9_Step); Servo_PROGRAM_Run(Servo_Prg_1, Servo_Prg_1_Step); Servo_PROGRAM_Center(); delay(1000); Servo_PROGRAM_Run(Servo_Prg_10, Servo_Prg_10_Step); Servo_PROGRAM_Center(); delay(1000); Servo_PROGRAM_Run(Servo_Prg_11, Servo_Prg_11_Step); Servo_PROGRAM_Center(); delay(1000); Servo_PROGRAM_Run(Servo_Prg_12, Servo_Prg_12_Step); Servo_PROGRAM_Center(); delay(1000); Servo_PROGRAM_Run(Servo_Prg_13, Servo_Prg_13_Step); Servo_PROGRAM_Center(); delay(1000); Servo_PROGRAM_Run(Servo_Prg_14, Servo_Prg_14_Step); Servo_PROGRAM_Center(); delay(1000); Servo_PROGRAM_Run(Servo_Prg_15, Servo_Prg_15_Step); Servo_PROGRAM_Center(); delay(1000); break; } Servo_PROGRAM = 0; } }
|