For the midterm project, during the brainstorming progress, we wanted to focus on the topic of environmental preservation and protecting the environment. This led to us using a real plant because we wanted to make the project more meaningful, in terms of real-life connections with the plant. With the presence of the plant, we can make our project more realistic and have real interaction with the plant, so my partner Tina and I decided to use a real plant. The purpose and the truthful meaning of the project is to convey the message that plants are important to our environment, and they are fragile. Therefore, we should not hurt any plants or bring any harm to them.
The interaction between the plant and the users is that when the users are not TOUCHING the plant, the plant will play the cheerful music of “It’s a Small World” and the Led Lights will be lighting up as green. When the user is TOUCHING the plant and ADDING PRESSURE. Then, the plant will have a dramatic mad sound and the Led Lights will be turning red. To make all of this happened, we used a pressure sensor that is on the leave, so when there is pressure placed on the plant, it will impact the color changing of the Led Lights and sound the plant will be producing. In addition, it order for the plant to produce sound, we used a speaker that is able to play the music out loud. Using a plant and the speaker was best suited for our project because for music to be play aloud in a nice quality, we had to use the speaker. In addition, to using the plant, it made our project interactive and suits our environmental theme. When designing the project, we wanted to make direct interaction with the plant and without using the pressure sensor, that did not work because we needed to put wires in the soil of the plant and using the voltages from the plant to act a response from the plant. This did not work because the soil has to be wet enough and keeping the soil at a good condition for that did not work. (Shown in Image 1). Therefore, we rejected this idea and used a pressure sensor instead.
Here are some pictures of the working progress:
During the process of production, we ran into many problems along the way. One obstacle we face when building our project is that the original plant that I bought for the project was a succulent and it was too small and when we wanted to place the pressure sensor onto the plant, we were not able to touch the pressure sensor because the plant was too sensitive and making it hard for the pressure sensor to be placed because we used a succulent and not a leaf plant. To solve this problem, we bought a bigger leaf plant for project. Therefore, we can place the pressure sensor and apply pressure to the plant without any fear. (Shown in Image 2). One other issue that arises when making the project is that we had a problem with the music and the sound quality of the project. In the project, we decided to use music and sound, so we included a buzzer with it. However, after the placement of the buzzer, we realized that the sound the buzzer produced is not pleasing and the sound quality is not at its best. Therefore, the solution to this is to borrow a speaker and replace the buzzer with a speaker as it will enhance better quality for the music playing of the project. On top of that, for the coding part of the assignment. At first, we struggle with the music because it will play the whole song and it will be too long. Then we had to cut down the music and make the music shorter so we can press the pressure sensor, then the color of the Led Lights will change. Another issue we encountered with the code is that we had trouble with the color changing of the Led Light and the pressure sensor. There were many problems of when we pressed the pressure sensor the color of the Led Lights the color did not change. Attached below is the sketches of the original plan for the project and the final plan for the project, and actual results of the project.
This is the code for the project:
#include <FastLED.h>
#define NUM_LEDS 60 // How many leds on your strip?
#define DATA_PIN 3
CRGB leds[NUM_LEDS];
int fsrPin = 0; // the FSR and 10K pulldown are connected to a0
int fsrReading;
int red;
int green;
int BUZZER_PIN = 9;
int vib_pin=7; //vibration sensor
int led_pin=13; //vibration sensor
#include “pitch.h”
int melody[] = {
NOTE_E5, NOTE_E5, NOTE_E5,
NOTE_E5, NOTE_E5, NOTE_E5,
NOTE_E5, NOTE_G5, NOTE_C5, NOTE_D5,
NOTE_E5,
NOTE_F5, NOTE_F5, NOTE_F5, NOTE_F5,
NOTE_F5, NOTE_E5, NOTE_E5, NOTE_E5, NOTE_E5,
NOTE_E5, NOTE_D5, NOTE_D5, NOTE_E5,
NOTE_D5, NOTE_G5
};
int durations[] = {
8, 8, 4,
8, 8, 4,
8, 8, 8, 8,
2,
8, 8, 8, 8,
8, 8, 8, 16, 16,
8, 8, 8, 8,
4, 4
};
int melody2[] = {
NOTE_E4, NOTE_F4, NOTE_G4, NOTE_E5, NOTE_C5, REST
};
int durations2[] = {
8, 8, 4, 4, 4
};
void setup() {
Serial.begin(9600);
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
FastLED.setBrightness(150);
pinMode(BUZZER_PIN, OUTPUT);
tone(BUZZER_PIN, 100, 1000); // screaming
{
pinMode(BUZZER_PIN, OUTPUT);
pinMode(vib_pin,INPUT); //vibration sensor
pinMode(led_pin,OUTPUT); //vibration sensor
}
}
void loop() {
fsrReading = analogRead(fsrPin);
red = constrain(map(fsrReading, 0, 600, 0, 255), 0, 255);
green = constrain(map(fsrReading, 0, 600, 255, 0), 0, 255);
for (int i = 0; i < NUM_LEDS; i = i + 1) {
leds[i] = CRGB(red, green, 0);
FastLED.show();
delay(5);
}
if (fsrReading > 300) {
tone(BUZZER_PIN,100,1000);
} else if (fsrReading < 100) {
//Serial.println(“Playing melody 2”);
int size2 = sizeof(durations2) / sizeof(int);
for (int note2 = 0; note2 < size2; note2++) {
//to calculate the note duration, take one second divided by the note type.
//e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
int duration2 = 1000 / durations2[note2];
tone(BUZZER_PIN, melody2[note2], duration2);
//to distinguish the notes, set a minimum time between them.
//the note’s duration + 30% seems to work well:
int pauseBetweenNotes2 = duration2 * 1.30;
delay(pauseBetweenNotes2);
//stop the tone playing:
noTone(BUZZER_PIN);
}
} else {
noTone(BUZZER_PIN);
}
int val;
val = digitalRead(vib_pin);
Serial.print(“vibration sensor: “);
Serial.println(val);
if (val == 1){
digitalWrite(led_pin,HIGH);
delay(1000);
digitalWrite(led_pin,LOW);
delay(1000);
}
else{
digitalWrite(led_pin,LOW);
}
For the first note we used the music from this website and the code is from: https://github.com/hibit-dev/buzzer/blob/master/src/songs/its_a_small_world/its_a_small_world.ino
This is music we played when the Led Lights are still green.
For the second note we used the music and the code from this website: https://forum.arduino.cc/t/piezo-and-tone-make-screeching-noise/487365
This is the music we played when the Led Lights changes to red because the pressure was placed onto the plant.
In conclusion, the goal of the project is to spread the message that plants are living things. Therefore, we must not put too much pressure and do anything that will bring harm to the plant because it is also bring harm to the environment. The project aligned with the definition of interaction because in our project we used plants to create the interactive base with humans and create the interactive plant design that tells the message of environmental preservation. During the final presentation, we were able to get the responses back from the audience as the they used to be unaware of the plants’ emotions because they would just pick on the plants without caring about the true feelings of the plants. After our project, they were able to get the message that it is important to care for the plant and care about the environment. One way I would want to improve about my project is that I would want to hide the wires from the plant design and the overall project. To solve this problem, we had to get the wire extension, so we can hide the wires. This is important because for the overall image of the project, it is important to make the things we are presenting more neat and clean for the audience. Another way I want to improve the project is to make the pressing of the leaf stand out to the audience, so they will know which one to press on. With more time to the project, I also want to add more sensors and act as the disruption to the plant and let the plant to be more interactive. Some takeaways I learned from the project is that sometimes you just have to keep trying and even though sometimes things will not turn out the way you wanted, it will always work out. For our project, we had many ups and downs for when making a lot of the things to work. With time and effort, we still try our best and made everything to work.
Attached Here is the link for the videos of our project: https://drive.google.com/drive/folders/12ZDBKEXckosePV5wj39zX6RIchm4lmCH?usp=share_link