Coding Day 1

Cheng Pang and Zengzi Li


Arduino code

Zengzi Li and Cheng Pang

#include <Servo.h>  // Include the Servo library


// Define the pin where the photoresistor is connected

const int photoResistorPin = A0;


// Define the pin where the servo is connected

const int servoPin = 12;


// Create a Servo object

Servo myServo;


void setup() {

  // Start the Serial Monitor at 9600 baud

  Serial.begin(9600);

  

  // Attach the servo to pin 12

  myServo.attach(servoPin);

  

  // Move the servo to its initial position (0 degrees)

  myServo.write(0);

  delay(1000); // Wait 1 second to ensure the servo is at 0 degrees

}


void loop() {

  // Read the value from the photoresistor

  int sensorValue = analogRead(photoResistorPin);

  

  // Print the sensor value to the Serial Monitor

  Serial.print("Photoresistor Value: ");

  Serial.println(sensorValue);

  

  // Check if the sensor value is above the threshold

  if (sensorValue > 22) {

    // Rotate the servo to 180 degrees

    myServo.write(7200);

    delay(1000);  // Wait for 1 second

    

    // Rotate the servo back to 0 degrees

    myServo.write(0);

    delay(1000);  // Wait for 1 second before checking again

  }

  

  // A small delay before checking again

  delay(100);

}

Mid review

Cheng Pang and Zengzi Li

Automated Roof

Mickey & Andy

Video

Fessy iLab and 2 OthersCheng Pang
Zengzi Li

hole fixed

Cheng Pang and Zengzi Li

First try+ fail 

Day 1 progress

Zengzi Li and Cheng Pang

Today I cut out the cardboard pieces that will be used for the walls of the greenhouse prototype

Initial sketches

Zengzi Li and Cheng Pang

Initial Ideas

Zengzi Li and Cheng Pang

Today We've decided on the final idea to create a structure similar to the stadium Mercedes Benz has in Atlanta, mimicking a human pupil's open and closure to control the amount of light being let into the room.

Bio-Brainstorm

Zengzi Li and Cheng Pang