Husky Mai
Published © MIT

Wolf: Search and Rescue Multi-Terrain Robot

Wolf is an IoT multi-terrain robot running on the Arduino 101 platform.

AdvancedFull instructions provided2 days5,647
Wolf: Search and  Rescue Multi-Terrain Robot

Things used in this project

Hardware components

Raspberry Pi 2 Model B
Raspberry Pi 2 Model B
×1
Arduino 101 & Genuino 101
Arduino 101 & Genuino 101
×1
Mini Maestro 18-Channel USB Servo Controller
×1
Raspberry Pi motor hat
×1
Pololu-Maestro 75:1 DC Micromotor
×4
Turnigy 6V / 2300 mAH Ni-MH Rechargeable Battery
×1
HobbyKing™ High Torque Servo
×12
Micro Servo
×2
3D Printed Parts
×1
M3 Cap Head Screws
OpenBuilds M3 Cap Head Screws
×3
Socket Head Screws M3 (25 Pack)
OpenBuilds Socket Head Screws M3 (25 Pack)
×3
standoff M3
×1

Software apps and online services

Arduino IDE
Arduino IDE
Watson
IBM Watson

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Custom parts and enclosures

wolf

Schematics

Wiring Schematics

Fzbrjhbix6g0u68 large rfdajuekuj

Code

Arduino 101 servo code

Arduino
#include

const int ServoNum = 12;

Servo legServo[ServoNum];
int servoPos[ServoNum];
int servoIndex;

int servoPin[ServoNum] = {23, 24, 25,
26, 27, 28,
29, 30, 31,
32, 33, 34};

void setup() {

Serial.begin(9600);
servoIndex = 0;

// ================ Servos ==================
for (int i=0; i<ServoNum; i++){
legServo[i].attach(servoPin[i]);
delay(50);
legServo[i].writeMicroseconds(1500);
servoPos[i] = 1500;
delay(100);
}
delay(500);

Serial.println(Ready);
Serial.println(enter + to increment);
Serial.println(enter  to decrement);
Serial.println(enter n to proceed to next servo);
Serial.println(enter l to go back to last servo);

}

void loop(){

if ( Serial.available()) {
char ch = Serial.read();

switch(ch){
case +:
servoPos[servoIndex] += 3;
if(servoPos[servoIndex] >= 2350){
servoIndex = 2350;
Serial.println(You cant turn it up anymore (you might damage it!);
}
else{
legServo[servoIndex].write(servoPos[servoIndex]);
Serial.println(servoPos[servoIndex]);
delay(100);
}
break;

case -:
servoPos[servoIndex] -= 3;
if(servoPos[servoIndex] <= 650){
servoIndex = 650;
Serial.println(You cant turn it down anymore (you might damage it!);
}
else{
legServo[servoIndex].write(servoPos[servoIndex]);
Serial.println(servoPos[servoIndex]);
delay(100);
}
break;

case n:
if(++servoIndex >= 12){
servoIndex = 11;
Serial.println(we have reached last servo);
}
else{
Serial.print(Switched to Pin );
Serial.println(servoPin[servoIndex]);
}
break;

case l:
if(servoIndex < 0){
servoIndex = 0;
Serial.println(we have reached first servo);
}
else{
Serial.print(Switched to Pin );
Serial.println(servoPin[servoIndex]);
}
break;

default:
Serial.println(Unknown Command );

}

coor GaitCalculate (){
//Calculate Gait positions

for (int LegIndex = 0; LegIndex < 4; LegIndex++){

if (GaitStep == GaitLegNr[LegIndex]) {
GaitPos[LegIndex].Y = -LegLiftHeight/2;
}
else if (GaitStep == GaitLegNr[LegIndex]+1) {
GaitPos[LegIndex].Z = 0;
GaitPos[LegIndex].Y = -LegLiftHeight;
}
else if (GaitStep == GaitLegNr[LegIndex]+2) {
GaitPos[LegIndex].Z = WalkLength/2;
GaitPos[LegIndex].Y = -LegLiftHeight/2;
}
else if (GaitStep == GaitLegNr[LegIndex]+3) {
GaitPos[LegIndex].Y = 0;
}
else{
// move body forward
GaitPos[LegIndex].Z -= WalkLength/TLDivFactor;

}

}

//Advance to the next step
if (++GaitStep > StepsInGait)
GaitStep = 1;
}

all code here

Credits

Husky Mai

Husky Mai

3 projects • 5 followers
Contact

Comments