Things used in this project

Hardware components:
R8326274 01
Raspberry Pi 2 Model B
×1
Ardgen 101
Arduino 101 & Genuino 101
×1
Mini Maestro 18-Channel USB Servo Controller
×1
Raspberry Pi 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
Openbuilds m3 caphead screw
OpenBuilds M3 Cap Head Screws
×3
Openbuilds socket head screws m3
OpenBuilds Socket Head Screws M3 (25 Pack)
×3
standoff M3
×1
Software apps and online services:
Ide web
Arduino IDE
Ibm watson avatar pos
IBM Watson
Hand tools and fabrication machines:
3drag
3D Printer (generic)
09507 01
Soldering iron (generic)

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;
}

Credits

Replications

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Make an Autonomous "Follow Me" Cooler
Advanced
  • 8,899
  • 69

Full instructions

We use an Arduino to build an autonomous "follow me" cooler that connects to a smartphone via Bluetooth and uses GPS to navigate.

Wildlife Detector
Advanced
  • 659
  • 12

Device detects motion, then takes a picture of triggering wildlife. Uses a neural net to identify the wildlife species and does something

MEGA BREAD - Hank the Hexabot
Advanced
  • 258
  • 4

Work in progress

A 6 legged, 18 servo, self guiding time wasting project. MEGA BREAD series #7, Delivery and retrieval from the air project.

Baby Room Watcher
Advanced
  • 421
  • 7

Full instructions

Monitor what happening in the baby room when we are not present there and send an SMS to the parent when motion is Detected.

Tracking TV Stand
Advanced
  • 568
  • 8

Full instructions

The Tracking TV Stand uses a Walabot to angle a monitor in the optimal angle for viewing depending on the audience in the field of view.

Smart Mirror with Home Automation using chats
Advanced
  • 1,314
  • 22

Full instructions

The mirror which shows news with date, calendar and quotes. Home automation can be controlled by Telegram chat.

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Feedback