Vibrant Otto - Craider (Crab-Spider)
Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.
Zapisane na tym urządzeniu.
A Vibrant , full of energy movable Otto spider/crab
- Ocena
- 0 / 5
- Polubienia
- 6
- Pobrania
- 19
- Wydruki
- 0
- Wyświetlenia
- 172
- Oceny
- 0
Aktualizacja u źródła:
Informacje o modelu
- Źródło
- Printables
- Kategoria
- Accessories
- Licencja
- Creative Commons — Attribution — Noncommercial — Share Alike
This project transforms the HP Otto platform into a compact, sensor-based robotic system that can detect and move towards nearby objects using an ultrasonic sensor.
The robot continuously measures distance and, when an object is detected within range, it moves towards it using coordinated servo motion. It can also move forward, backward, and turn left or right, demonstrating basic autonomous behavior.
The system is designed using an ESP32 and the ESP32Servo library, making it compatible with both standard 9g servos and continuous rotation servos. The model is optimized for clean assembly, internal wire management, and easy 3D printing.
I am new to robotics and coding, and this project was created as a learning experience. The code has been written based on my understanding and references, but it has not been physically tested as I do not currently have the full kit. Some adjustments may be required when building in real life.
This project is based on the original HP Otto design, licensed under Creative Commons Attribution-NonCommercial-ShareAlike (CC BY-NC-SA). Modifications have been made to extend its functionality. Credit to the HP Otto team. This work is shared under the same license for non-commercial use.
I was unable to create STEP files, so I have provided reference images instead. Please refer to them during assembly. The circular parts fit into the larger holes; they can be secured using super glue.
crab bot , crab bot 1 , crab bot 2 , crab bot 3 are ptint file and crab bot 4 , crab bot 5 are different models
Due to some technical issues, I was not able to include final print files. You can print the model using your preferred settings.
Thank you for your understanding.
I apologize for any mistakes. I am still learning and did not intend to make any errors.
#include <ESP32Servo.h>
// ===== SERVOS =====
Servo FL_hip, FL_knee;
Servo FR_hip, FR_knee;
Servo BL_hip, BL_knee;
Servo BR_hip, BR_knee;
// ===== PINS =====
#define FL_HIP 13
#define FL_KNEE 12
#define FR_HIP 14
#define FR_KNEE 27
#define BL_HIP 26
#define BL_KNEE 25
#define BR_HIP 33
#define BR_KNEE 32
// ===== ULTRASONIC =====
#define TRIG_PIN 5
#define ECHO_PIN 18
// ===== DISTANCE =====
long getDistance() {
digitalWrite(TRIG_PIN, LOW);
delayMicroseconds(2);
digitalWrite(TRIG_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG_PIN, LOW);
long duration = pulseIn(ECHO_PIN, HIGH, 30000);
if (duration == 0) return 999;
return duration * 0.034 / 2;
}
// ===== BASIC POSITIONS =====
void stand() {
FL_hip.write(90); FL_knee.write(90);
FR_hip.write(90); FR_knee.write(90);
BL_hip.write(90); BL_knee.write(90);
BR_hip.write(90); BR_knee.write(90);
}
// ===== MOVE LEG =====
void lift(Servo &knee) { knee.write(60); }
void drop(Servo &knee) { knee.write(90); }
void forwardLeg(Servo &hip) { hip.write(120); }
void backwardLeg(Servo &hip) { hip.write(60); }
// ===== GAIT: FORWARD =====
void walkForward() {
// Diagonal pair 1
lift(FL_knee); lift(BR_knee);
forwardLeg(FL_hip); forwardLeg(BR_hip);
delay(200);
drop(FL_knee); drop(BR_knee);
// Diagonal pair 2
lift(FR_knee); lift(BL_knee);
forwardLeg(FR_hip); forwardLeg(BL_hip);
delay(200);
drop(FR_knee); drop(BL_knee);
}
// ===== BACKWARD =====
void walkBackward() {
lift(FL_knee); lift(BR_knee);
backwardLeg(FL_hip); backwardLeg(BR_hip);
delay(200);
drop(FL_knee); drop(BR_knee);
lift(FR_knee); lift(BL_knee);
backwardLeg(FR_hip); backwardLeg(BL_hip);
delay(200);
drop(FR_knee); drop(BL_knee);
}
// ===== TURN LEFT =====
void turnLeft() {
lift(FR_knee); lift(BR_knee);
forwardLeg(FR_hip); forwardLeg(BR_hip);
delay(200);
drop(FR_knee); drop(BR_knee);
}
// ===== TURN RIGHT =====
void turnRight() {
lift(FL_knee); lift(BL_knee);
forwardLeg(FL_hip); forwardLeg(BL_hip);
delay(200);
drop(FL_knee); drop(BL_knee);
}
// ===== SETUP =====
void setup() {
pinMode(TRIG_PIN, OUTPUT);
pinMode(ECHO_PIN, INPUT);
FL_hip.attach(FL_HIP); FL_knee.attach(FL_KNEE);
FR_hip.attach(FR_HIP); FR_knee.attach(FR_KNEE);
BL_hip.attach(BL_HIP); BL_knee.attach(BL_KNEE);
BR_hip.attach(BR_HIP); BR_knee.attach(BR_KNEE);
stand();
delay(2000);
}
// ===== LOOP =====
void loop() {
long dist = getDistance();
if (dist < 25) {
// Move toward object
walkForward();
} else if (dist > 50) {
// Search for object
turnLeft();
} else {
// Adjust position
walkForward();
}
delay(100);
}
