Tantalus is a character from the Greek mythology who was once favored by the gods, however ended up getting punished by them. Tantalus was a human, but being an intimate friend of the gods, grew arrogant and tested the gods' wisdom and deceived them. For these transgressions, he was condemned to Tartarus, the realm of the underworld, where he suffered from eternal hunger and thirst. He stood with water up to his neck and fruit hanging just above his reach. Yet whenever he tried to pluck the fruit, it would rise out of reach, and whenever he bent down to drink the water, it would recede.Reflecting on my past experiences where greed and overreach only pushed my goals further away and negatively impacted me, I created a piece inspired by this story. The branch bearing fruit appears enticing and seem close enough to catch, but the moment you reach out, they run away.
I wanted the branch to be aesthetic, enticing and sparkling. Inspired by the ornamental pine tree, the branch has a curved shape. Since it had to be held by a single string, the shape itself had to be well balanced.
The ultrasonic sensor on the piece keeps reading the distance. Once the distance is closer than an assigned number, it will send a signal to the motor to turn 180 degrees. Then The pulley wheel connected to the motor will then lift up the sensor which is connected to the branch.
Input : Distance from a person’s hand to the sensor
Output : Movement of the servo motor
When IR obstacle sensor detects the motor turns forward for a second. When it’s not detecting anything, it stops turning.
#include <Servo.h>
Servo myServo;
int trig = 8;
int echo = 9;
int angle = 0;
void setup() {
myServo.attach(7);
pinMode(trig, OUTPUT);
pinMode(echo, INPUT);
Serial.begin(9600);
}
void loop() {
long duration, distance;
// Send ultrasonic pulse
digitalWrite(trig, LOW);
delayMicroseconds(10);
digitalWrite(trig, HIGH);
delayMicroseconds(10);
digitalWrite(trig, LOW);
// Measure the time for echo
duration = pulseIn(echo, HIGH);
// Calculate the distance in cm
distance = ((float)(340 * duration) / 10000) / 2;
Serial.print(distance);
Serial.println(" cm");
// Move the servo based on distance
if (distance < 25) {
angle = 180;
Serial.println("Object close");
delay(10);
} else {
angle = 0;
}
myServo.write(angle);
delay(100); // Add a delay to avoid rapid switching
}