Monday, March 27, 2017

Photo Sensor Arduino Lab

int photoPin =0;
int ledPin = 13;

void setup() {
 Serial .begin(9600);
 pinMode(ledPin, OUTPUT);
}

void loop() {
int value = analogRead(photoPin);
Serial.println(value);
if (value <=800){
  digitalWrite(ledPin, HIGH);
}
else {
  digitalWrite(ledPin, LOW);
}
delay(25);
}

Eliminating light to the photo sensor causes the light to come on. Any value below 800 will cause the light to come on and react but any value over 800 keeps the led off.

ADD if statements like
 //code to run the microservo
  //code to start a motor
  //code to emit a foul odor

To make the LED blink when it is below or equal to 800 add the code:

void loop() {
int value = analogRead(photoPin);
Serial.println(value);
if (value <=800){
  digitalWrite(ledPin, HIGH);
  delay(500);
  digitalWrite(ledPin, LOW);
  delay(500);
}
else {
  digitalWrite(ledPin, LOW);
}
delay(25);
}

Adding more else if and changing range

int photoPin =0;
int ledPin = 11;

void setup() {
 Serial .begin(9600);
 pinMode(ledPin, OUTPUT);
}

void loop() {
int value = analogRead(photoPin);
Serial.println(value);
if (value <=600){
  digitalWrite(ledPin, 124);
}
else if(value >=300 && value <=499){
  analogWrite(ledPin, 180);
}
else if(value >=0 && value <=299){
  analogWrite(ledPin, 255);
}
else {
  analogWrite(ledPin, 0);
}
delay(25);
}

Monday, March 20, 2017

Final Project Idea

Pulse Energy Sword

 For my final project I will be creating an energy sword from the game Halo. The energy sword will be programmed to change the colors of the leds in the blade according to the rate of your heart beat. I will be using a pulse sensor and RGB leds. The blades of the energy sword will be made of acrylic and the handle will be created through a 3D printer.


https://www.instructables.com/id/Laser-Cut-Energy-Sword/

https://www.instructables.com/id/My-DIY-Halo-Covenant-Sword-really-glows/








Wednesday, March 8, 2017

Arduino Math

Constants(Written in all caps)

      True/False
      High/Low
      Input/Output

If(b==TRUE){Do something();}

Monday, March 6, 2017

Final Project Rubric

Rubric:

Final
     2 parts
          -Equally Weighed (20 & 20)
          -Project Plant: the thing it is; the physical manifestation of it
                -Formalist Issues, Cultural Issues, Mechanical Issues(half of project)
                       -Formalist=line, shape, value
                       - Cultural=
                       -Mechanical=does it work
        -Social & Communication you will develop about this(half of project)
               -Bill of Materials
                      -Well listed
                      -Excel Spreadsheet
                      -Links to specific items
                      -Described why he used certain parts over others(digital window sticker)
               -Use pictures along with text
               -Grammar Counts
               -Language
               -Quality Images
                     -Enough light
                     -Focus
                     -Frame composition well
                     -Video
                -Document while creating entire project
-Other types of assets
       -Coding(give credit to how it evolved)


   

Sunday, March 5, 2017

The Good, Bad & Horrendous

Good:
http://www.instructables.com/id/How-to-build-an-electric-Longboard-with-phone-cont/?ALLSTEPS

Tells you the easy way to have your motor mounted but also gives you alternative ideas that he had came up with if you didn't prefer to spend the money on the trucks that come with a mounting system already. Gives you links to some of the materials he used and also gives you the code for the Arduino.

Bad:
https://www.instructables.com/id/5x5-LED-Cube-Arduino-Uno/

Images aren't appealing, aren't exactly focused and have too much going on in the background.




Horrendous:
https://www.instructables.com/id/Arduino-Breathalyzer/

The person title the instructable Arduino-Breathalyzer and even defines what a breathalyzer is. He then gives more details into a breathalyzer and then states that the intractable is meant to be used as a means to make your own breathalyzer. But then in the next paragraph he follows all this up by saying this breathalyzer is not meant to be used as a means of breathalyzing. He also tells you that in order to make the mouth piece in which you blow into he used an inhaler but unless you have asthma you can't get one of those and he gives no substitution ideas.

Friday, March 3, 2017

Ch. 2

In this chapter the author starts off with something I feel I knew already. We are becoming slaves to machines. In our generation I feel the machine that enslaves us the most is the cell phone. How many times have you been interacting with other people whether just in conversation or eating a meal and you have checked your phone. I know I am guilty of that. As stated by the author it's not the actual machine that we are becoming slaves to, it's what the machines capabilities are. In the case of the cell phone it is mainly socialization. We are able to be in constant touch with friends or family and through social media voyeuristically peer into the lives of others. It is also stated that we are attracted to the packaging of these machines not what lies inside. We recognize, for instance a radio by what it looks like and what we know it can do. Not by the inner workings of it. They become what they are through their design. Sometimes machines can staunch our creativity. There is so far you can go with programs such as photoshop or taking pictures with a digital camera. The author points out that the camera so controls the pictures we take nowadays that it is hard to take a bad picture. The camera will adjust itself or warn you if you are taking a blurry picture or are off center. It leaves no room for intentional creative mistakes. We are conditioned to operate technology the way it is pResented to us. Technology is so intricately connected to our lives that it sometimes feels like man and machine are one. Technology has brought such an ease to our lives that it has made it difficult to imagine life without it.