Team mate: Ziai, Vanessa

1. Background and Concept Selection

Bases on the feedback we got from Viola, so we tried to narrow down the scope that ensure we could deliver our mid-term project within two weeks, so for this week, we tried to make a simple MVP that could work first, and our final concept selection is “ Scare you out”, When you approach, there some spooky creatures like pumpkin will show up to scare you out.

Untitled

Untitled

Untitled

Untitled

2. How to make it work:

To enhance our collaboration's efficiency, I will focus on the circuitry, while Ziai will concentrate on the decorations. For this week, we will use an Ultrasonic sensor for the MVP. When people approach, the spooky pumpkin will show up.

First, I will work on making the LED light up. Then, we will cut out spooky pumpkin shapes from paper and display their shadows on the box or wall in the doorway when people approach.

Untitled

3. Experiment & Exercise

3.2 Circuit Experiment:

We tried some small experiments to understand how to use that sensor,

Circuit Diagram

I have uploaded codes to the Arduino , which then upload to the controller to make it work.

const int trig = 12;
const int echo = 13;

const int LED1 = 8;
const int LED2 = 7;

int duration = 0;
int distance = 0;

void setup() 
{
  pinMode(trig , OUTPUT);
  pinMode(echo , INPUT);
  
  pinMode(LED1 , OUTPUT);
  pinMode(LED2 , OUTPUT);
  
  Serial.begin(9600);

}

void loop()
{
  digitalWrite(trig , HIGH);
  delayMicroseconds(1000);
  digitalWrite(trig , LOW);

  duration = pulseIn(echo , HIGH);
  distance = (duration/2) / 28.5 ;
  Serial.println(distance);
  

  if ( distance <= 50 && distance > 0 )
  {
    digitalWrite(LED1, HIGH);
    digitalWrite(LED2, HIGH);
  }
  else
  {
    digitalWrite(LED1, LOW);
    digitalWrite(LED2, LOW);
  }
}

source: We learn from this tutorial :https://www.youtube.com/watch?v=xZ8kKT-DLxk

3.2 Experiment: