Project #2 planning

Control the speed http://www.dummies.com/how-to/content/how-to-control-the-speed-of-a-dc-motor-with-the-ar.html

The text in which is needed for the design of my project number 2.

night light setup

void setup() {
Serial.begin(9600);
pinMode(3, OUTPUT);
}
void loop() {
int sensorValue = analogRead(A0);
if (sensorValue < 200) { // To change the point at which the light turns on change this value.
digitalWrite(3, HIGH);
}
else {
digitalWrite(3,LOW);
}
}

http://makezine.com/projects/arduino-controlled-night-light/ website for coding
^^ This is the sensor light in which the LEDs go on when the sensor is covered.

const int switchPin = 2;
const int motorPin = 9;
int switchState = 0;

void setup() {
pinMode(motorPin, OUTPUT);
pinMode(switchPin, INPUT);
}

void loop(){
switchState = digitalRead(switchPin);

if (switchState == HIGH) {
digitalWrite(motorPin, HIGH);
}
else {
digitalWrite(motorPin, LOW);
}
}
coding for the process in which the wheel spins.

Must still figure out how to control the speed in which the wheel spins.

the other idea is to go with the LCD screen saying open or closed depending on the operation of the wheel itself.

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: