CTE, CTE F/W, Galileo, Uncategorized

Light Sensor

20151210_113808

int photocellPin = 0; // the cell and 10K pulldown are connected to a0
int photocellReading; // the analog reading from the sensor divider
int LEDpin = 11; // connect Red LED to pin 11 (PWM pin)
int LEDbrightness; //
void setup(void) {
// We’ll send debugging information via the Serial monitor
Serial.begin(9600);
}

void loop(void) {
photocellReading = analogRead(photocellPin);

Serial.print(“Analog reading = “);
Serial.println(photocellReading); // the raw analog reading

// LED gets brighter the darker it is at the sensor
// that means we have to -invert- the reading from 0-1023 back to 1023-0
photocellReading = 1023 – photocellReading;
//now we have to map 0-1023 to 0-255 since thats the range analogWrite uses
LEDbrightness = map(photocellReading, 0, 1023, 0, 255);
analogWrite(LEDpin, LEDbrightness);

delay(100);
}

Standard
CTE, CTE F/W, Fall term, Perf. Task, Uncategorized

Define

We’ll need the following, Motion sensor, beeper, bread board, galileo gen 2, hopper cables, micro USB cable, LEDs. Our code has to tell the galileo to sense motion, and after its sensed, for it too beep and blink. Basically it has to work as a security alarm system. Items taken from this list: http://makezine.com/projects/pir-sensor-arduino-alarm/. This device needs to understand how to sense motion then respond by emitting sound and flashing lights.

Standard
CTE, CTE F/W, Perf. Task, Uncategorized

Discover

Our project(Jorge & Me) will be on sound, motion, and lights. We will incorporate all three aspects, we will use a alarm system, so whenever something moves in front of the motion sensor. Sounds will emit from the computer and the led’s will go on and off. Well name it Home Security, I want it to sense any type of movement past a certain area.

We got this idea from: http://www.instructables.com/id/ARDUINO-WIRELESS-HOME-SECURITY-SYSTEM/

Standard