Project #2 planning

Control the speed

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

night light setup

void setup() {
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 {
} 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.


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

%d bloggers like this: