Hugging Robot

Published

Introduction: Hugging Robot

Nothing is better than a hug when you feel lonely. This Arduino powered robot fulfills this need without requiring any human beings.

Step 1: Eat a Lot of Pizza

We built our robot out of pizza boxes, but any cardboard or wood would do. You need a body to connect the arms to, and a way to keep the robot standing. We made a stand out of wood.

Step 2: Connect the Arms to Rope, and the Rope to a Mixer

The arms of our robot are powered by an old mixer, which is taped to the base.

Step 3: Put Two LEDs in Pinpong Balls

this step speaks for itself.

Step 4: Connect the Sensor, the Relay and the LEDs to the Arduino

The robot is activated by a photoresistor. The Arduino then signals a relay, which activates the mixer. At the same time the LEDs in the eyes are activated.

Step 5: Code

The code for this project is fairly simple. We only use three Arduino pins: one analog input for the photoresistor (A0), an output for the motor (11), and one output for the LEDs (9). Since the robot can’t reset itself, the Arduino doesn’t have to either. After the robot is activated, the Arduino just ends on a very long delay that provides enough time to reset it manually by pushing the button.

void setup() {
pinMode(11, OUTPUT); pinMode(A0,INPUT); pinMode(9, OUTPUT); }
void loop() {
  int value = analogRead(A0);
  if (value < 600){
    digitalWrite(11, LOW);
    delay(200);
    digitalWrite(9, HIGH);
    delay(200);
    digitalWrite(11, HIGH);
    delay(10000000000000000000000);
  }else{
    digitalWrite(9, LOW);
    digitalWrite(11, HIGH);
  }
}

Share

    Recommendations

    • Oil Contest

      Oil Contest
    • Water Contest

      Water Contest
    • Clocks Contest

      Clocks Contest

    Discussions