Announcements

November 24, 2007
Reading for November 27th, are now posted. Enjoy!

October 2, 2007
To upload your thoughtless acts, create a new assignment page like any other lab. You'll see "Thoughtless Acts" listed as one of the assignment options.

May 24, 2008
This site has been archived and is no longer editable. Stay tuned for the next version, coming in the fall!


Revision of Automatic Curtain from Thu, 10/11/2007 - 00:36

Project Members: 
Sheng-Ying Pao

Description 

I made 2 automatic curtains with--

a DC motor,

a rope,

an empty yogurt bottle,


a round piece of paperboard,

a curtain,

the Arduino board, bread board, batteries and resistors.

a force sensor/a photocell

AutoCurtain

To illustrate stepping on the sensor, here I use a slipper in stead of a rug in this picture


 

Automatic Curtain 1--

Every time when I want to stand at my French door to look out through it, or when I want to open the door to go to my little patio, I'll have to step on the mat in front of the door.

In this case, I put the force sensor under the mat in front of my door. When I step on the mat, the curtain will be automatically drawn open.

Automatic Curtain 2--

I put my bed beside the window. Everyday in the morning I hope my curtain will open by itself so that the sunlight will wake me up. After I open my eyes on the bed, the first sight will be the beautiful sky!!

In this case, I use the photocell instead of the force sensor. Putting the entire set by my window, the photocell can detect sunlight and control the curtain. 

 

My Code

/*

 * one pot fades one motor

 * modified version of AnalogInput

 * by DojoDave <http://www.0j0.org>

 * http://www.arduino.cc/en/Tutorial/AnalogInput

 * Modified again by dave and again by Aithne Sheng-Ying Pao

 */

 

int controlPin = 0;   // select the input pin for the photocell or the force sensor

int motorPin = 9; // select the pin for the Motor

int val = 0;      // variable to store the value coming from the sensor

void setup() {

  Serial.begin(9600);

}

void loop() {

  val = analogRead(potPin);    // read the value from the sensor, between 0 - 1024

  Serial.println(val);

  analogWrite(motorPin, val/4); // analogWrite can be between 0-255

}

 

My Video

http://www.youtube.com/watch?v=5ZEPpiYs9RQ

 


AttachmentSize
pic.JPG108.48 KB

Powered by Drupal - Design by Artinet