mirror of
https://github.com/cguweb-com/Arduino-Projects.git
synced 2026-03-13 08:22:19 +08:00
minor updates
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,14 @@
|
||||
/*
|
||||
* NovaSM2 - a Spot-Micro clone
|
||||
* Version: 3.0
|
||||
* Version Date: 2021-03-12
|
||||
*
|
||||
* Author: Chris Locke - cguweb@gmail.com
|
||||
* GitHub Project: https://github.com/cguweb-com/Arduino-Projects/tree/main/Nova-SM2
|
||||
* Instructables Project: https://www.instructables.com/member/cguweb/instructables/
|
||||
*
|
||||
*/
|
||||
|
||||
#define TOTAL_SERVOS 12
|
||||
#define TOTAL_LEGS 4
|
||||
|
||||
@@ -26,46 +37,51 @@
|
||||
//setup servo data arrays
|
||||
byte activeServo[TOTAL_SERVOS];
|
||||
byte activeSweep[TOTAL_SERVOS];
|
||||
int servoSweep[TOTAL_SERVOS][6]; //start_pos, target pos, sweep type, loops, delay ms, [unused]
|
||||
byte servoSwitch[TOTAL_SERVOS];
|
||||
float servoSpeed[TOTAL_SERVOS];
|
||||
float servoPos[TOTAL_SERVOS];
|
||||
float targetPos[TOTAL_SERVOS];
|
||||
float servoSweep[TOTAL_SERVOS][6]; //start_pos, target pos, sweep type, loops, delay ms, [unused]
|
||||
float servoRamp[TOTAL_SERVOS][8]; //speed, travel_distance, ramp1_spd, ramp1_dist, ramp1_inc, ramp2_spd, ramp2_dist, ramp2_inc
|
||||
int servoSequence[TOTAL_LEGS];
|
||||
int servoDelay[TOTAL_SERVOS][2];
|
||||
int servoStep[TOTAL_SERVOS];
|
||||
int servoSwitch[TOTAL_SERVOS];
|
||||
float servoSpeed[TOTAL_SERVOS];
|
||||
float servoPos[TOTAL_SERVOS];
|
||||
float targetPos[TOTAL_SERVOS];
|
||||
int bodyBone[3] = { //bone lengths in mm : length, width, height
|
||||
180, 120, 200 //(ie: measured on pivots: shoulder-to-shoulder, coax-to-coax, and ground-to-coax)
|
||||
};
|
||||
int servoBone[TOTAL_LEGS][3] = { //bone lengths in mm : tibia, femur, shoulder
|
||||
{132, 105, 90}, //RFC, RFF, RFT
|
||||
{132, 105, 90}, //LFx
|
||||
{132, 105, 90}, //RRx
|
||||
{132, 105, 90}, //LRx
|
||||
};
|
||||
|
||||
int servoSetup[TOTAL_SERVOS][2] = { //driver, pin
|
||||
{1,0}, {1,1}, {1,2}, //RFx
|
||||
{1,4}, {1,5}, {1,6}, //LFx
|
||||
{1,8}, {1,9}, {1,10}, //RRx
|
||||
{1,0}, {1,1}, {1,2}, //RFx
|
||||
{1,4}, {1,5}, {1,6}, //LFx
|
||||
{1,8}, {1,9}, {1,10}, //RRx
|
||||
{1,12}, {1,13}, {1,14}, //LRx
|
||||
};
|
||||
float servoHome[TOTAL_SERVOS] = { //home pos
|
||||
|
||||
float servoHome[TOTAL_SERVOS] = { //home pos
|
||||
417, 301, 435, //RFx
|
||||
355, 422, 355, //LFx
|
||||
348, 344, 396, //RRx
|
||||
364, 341, 306, //LRx
|
||||
};
|
||||
float servoLimit[TOTAL_SERVOS][2] = { //min, max
|
||||
|
||||
float servoLimit[TOTAL_SERVOS][2] = { //min, max
|
||||
{379, 499}, {226, 466}, {322, 548}, //RFx
|
||||
{393, 273}, {497, 257}, {468, 242}, //LFx
|
||||
{310, 430}, {269, 509}, {283, 509}, //RRx
|
||||
{402, 282}, {416, 176}, {419, 193}, //LRx
|
||||
};
|
||||
int servoStepMoves[TOTAL_SERVOS][6] = { //step1, step2, etc
|
||||
|
||||
int servoStepMoves[TOTAL_SERVOS][6] = { //step1, step2, etc
|
||||
{0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, //RFx
|
||||
{0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, //LFx
|
||||
{0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, //RRx
|
||||
{0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, //LRx
|
||||
};
|
||||
|
||||
int bodyBone[3] = { //bone lengths in mm : length, width, height
|
||||
180, 120, 200 //(ie: measured on pivots: shoulder-to-shoulder, coax-to-coax, and ground-to-coax)
|
||||
};
|
||||
|
||||
int servoBone[TOTAL_LEGS][3] = { //bone lengths in mm : tibia, femur, shoulder
|
||||
{132, 105, 90}, //RFC, RFF, RFT
|
||||
{132, 105, 90}, //LFx
|
||||
{132, 105, 90}, //RRx
|
||||
{132, 105, 90}, //LRx
|
||||
};
|
||||
BIN
Nova-SM2/ps2_controller.png
Normal file
BIN
Nova-SM2/ps2_controller.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 154 KiB |
Reference in New Issue
Block a user