mNo edit summary |
mNo edit summary |
||
Line 194: | Line 194: | ||
<u>1rts Board:</u> | <u>1rts Board:</u> | ||
<u>main.cpp:</u> | |||
<small><code>#include <Servo.h></code></small> | <small><code>#include <Servo.h></code></small> | ||
<small><code>#define TRIG_PIN 2 // Pin Trig | <small><code>#define TRIG_PIN 2 // Pin Trig ultrasonic sensor</code></small> | ||
<small><code>#define ECHO_PIN 3 // Pin Echo | <small><code>#define ECHO_PIN 3 // Pin Echo ultrasonic sensor</code></small> | ||
<small><code>Servo myservo; </code></small> | <small><code>Servo myservo; </code></small> | ||
Line 209: | Line 206: | ||
<small><code>float ang = 18; // Ángulo base de oscilación</code></small> | <small><code>float ang = 18; // Ángulo base de oscilación</code></small> | ||
<small><code>int distanciaPersona = 65; // | <small><code>int distanciaPersona = 65; // first umbral</code></small> | ||
<small><code>int distanciaCercana = 50; // | <small><code>int distanciaCercana = 50; // second umbral</code></small> | ||
<small><code>void setup() {</code></small> | <small><code>void setup() {</code></small> | ||
Line 231: | Line 228: | ||
<small><code>int distance;</code></small> | <small><code>int distance;</code></small> | ||
<small><code>// | <small><code>// send ultrasonic pulse</code></small> | ||
<small><code>digitalWrite(TRIG_PIN, LOW);</code></small> | <small><code>digitalWrite(TRIG_PIN, LOW);</code></small> | ||
Line 255: | Line 252: | ||
<small><code>Serial.println(" cm");</code></small> | <small><code>Serial.println(" cm");</code></small> | ||
<small><code>// | <small><code>// Event 2: if distance is less than 30 cm, bmovimiento</code></small> | ||
<small><code>if (distance < distanciaCercana) {</code></small> | <small><code>if (distance < distanciaCercana) {</code></small> |
Revision as of 13:27, 23 February 2025
Yo sé de de nombres extraños
De las plantas y las flores,
Y de mortales engaños
Y de sublimes dolores.
…
(I know strange names
Of plants and flowers,
And of deadly cheatings
And of sublime pains.)
José Martí. “Versos Sencillos”, Fragment.
( José Julián Martí Pérez (Havana, 1853 - Dos Ríos, 1895) was a Cuban politician, diplomat, poet, essayist, journalist and philosopher, founder of the Cuban Revolutionary Party and organizer of the Cuban War of Independence, during which he died in combat. He is considered the initiator of literary modernism in Latin America. He is considered the national hero of the Republic of Cuba, and his ideals of independence and anti-colonialism have been used by the Cuban regime to politically indoctrinate the Cuban people. But these same ideals of nationalism and independence also serve as a guide and inspiration to the opposition that desires a Cuba without repression, a just country and a republic “with everyone and for the good of everyone”).
Concept
The lemon tree is a resilient plant that bears fruit even when it is dying.
In this project, the lemon tree is a symbol of the members and generations of my Cuban family, it is an inheritance of sentimental and moral values in it.
This piece is inspired by my grandfather, Justo Manuel González. The last words he wrote, when he was already losing his faculties, were an autobiography recounting the enormous work he did, mostly linked to the Cuban revolutionary process and its social and economic tasks. Justo, who was a “national vanguard” of the Cuban Revolution, worked with honesty, sacrifice, and faith, to create a good society for his family, his community, and his country. He died in 2021 in Cuba, after several months of being a victim of medical abandonment and negligence since his country became corrupted and neglectful of its people.
He never lived the system and country he dreamed of, even when he worked and fought for it his whole life.
The death of the old lemon tree also speaks about the Cuban context in general, its history, and its current sociopolitical crisis that generates physical and sentimental ruptures of its most vulnerable families. It has affected especially the humble elderly people who were the working generations who created and supported the revolutionary Cuban process that became corrupted. Now, those persons are the most affected by the crisis, being abandoned by the social system to which they gave their faith and the effort of their lives. The piece is a tribute to them.
Description
The project is an archive of three generations of lemon trees in my family, using photos, writings, sketches, dried branches and fruits, and new plants.
The archive starts with the death of the old lemon tree in my parents’ home in Cuba, depicting its analogy with my grandfather´s death and life. I decided to show a photo of the still-full-of-lemon branch of the dead old tree and also a photo of when that tree completely fell down.
I used the branches collected from that tree, making them move when the visitor approached close to them. It was also shown a dried lemon from that tree.
The archive also shows how my parents in Cuba, after the death of the old lemon tree planted a new lemon tree in their yard, and also show how I, a few years after escaping from Cuba, decided to start planting new lemon trees, as a way of approach to my family and roots despite distance and exile.
I also set up a house-shaped terrarium with the new lemon tree plants.
Embedded systems
In the project, were implemented two systems of sensors and actuators controlled by Arduino boards, and programmed in Visual Studio Code and Arduino programs.
1rst System:
For the moving branch, it was set a system with an HC-SR04 Ultrasonic Distance Sensor controlling a 15 kg Digital Servo Motor, through an Arduino Nano and a connective board.
When the spectator approaches 65 cm of the branches, the servo motor starts to turn from 0 to 18 degrees, making the branches, attached to it, start to move. If the spectator approaches at a closer distance (50 cm), the servo motor turns from 0 to 40 degrees, making the branches move a little bit more.
The Servo Motor received an extra supply of energy from an MB-102 3.3V/5V Power Module plugged into electricity and connected to the board of the 2nd System.
1rst System
Devices:
- Arduino Nano
- Connective board
- HC-SR04 Ultrasonic Distance Sensor
- Miuzei 15 kg Digital Servo Motor
- Connection cables
(The written code is at the end of the page)
2nd System:
The terrarium had a humidifier system inside. It was made with a Capacitive Soil Moisture Sensor connected to an Arduino Nano and a connective board. When the soil got drier (over value 400 read by that sensor, whose values are approximately this: wet is < 400, dry is > 400), a 5V Relay Module also connected to the board, activated a 5V Humidifier made with a piezoelectric. When the soil got humid again (under value 400) the humidifier stopped until the soil got dry again. The relay and humidifier received an extra supply of energy from an MB-102 3.3V/5V Power Module plugged into electricity.
2nd System
Devices:
- Arduino Nano
- Connective board
- Capacitive Soil Moisture Sensor
- 5V Relay Module
- 5V Humidifier made with a piezoelectric
- MB-102 3.3V/5V Power Module
- Connection cables
(The written code is at the end of the page)
Exhibition
The installation was displayed with a set of mini LED spotlights. Those were connected to a timer that switched the lights on during the daytime and switched the lights off during the nighttime. That created a proper light environment for the tiny lemon trees during the days of the exhibition.
“Y de mortales engaños, Y de sublimes dolores” was displayed in the exhibition of the class “The Plant Plant” during the Winterwerkschau of the Bauhaus University Weimar. Winter Semester 2024 – 2025.
Code
1rts Board:
main.cpp:
#include <Servo.h>
#define TRIG_PIN 2 // Pin Trig ultrasonic sensor
#define ECHO_PIN 3 // Pin Echo ultrasonic sensor
Servo myservo;
float ang = 18; // Ángulo base de oscilación
int distanciaPersona = 65; // first umbral
int distanciaCercana = 50; // second umbral
void setup() {
Serial.begin(9600);
pinMode(TRIG_PIN, OUTPUT);
pinMode(ECHO_PIN, INPUT);
myservo.attach(9);
}
void loop() {
long duration;
int distance;
// send ultrasonic pulse
digitalWrite(TRIG_PIN, LOW);
delayMicroseconds(2);
digitalWrite(TRIG_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG_PIN, LOW);
// Leer el tiempo de respuesta del eco y calcular distancia
duration = pulseIn(ECHO_PIN, HIGH);
distance = duration * 0.034 / 2;
Serial.print("Distancia: ");
Serial.print(distance);
Serial.println(" cm");
// Event 2: if distance is less than 30 cm, bmovimiento
if (distance < distanciaCercana) {
int maxAngulo = ang + 40; // Aumenta el rango de oscilación
if (maxAngulo > 180) maxAngulo = 180; // Limita el ángulo a 180°
for (int pos = 0; pos <= maxAngulo; pos += 1) {
myservo.write(pos);
delay(15);
}
for (int pos = maxAngulo; pos >= 0; pos -= 1) {
myservo.write(pos);
delay(15);
}
}
// Evento 1: Si la distancia es menor a 65 cm pero mayor o igual a 30 cm
else if (distance < distanciaPersona) {
for (int pos = 0; pos <= ang; pos += 1) {
myservo.write(pos);
delay(15);
}
for (int pos = ang; pos >= 0; pos -= 1) {
myservo.write(pos);
delay(15);
}
}
// Si no hay objeto cerca, dejar el servo en 0°
else {
myservo.write(0);
}
delay(500); // Pequeño retraso antes de la siguiente medición
}
2nd Board: