Thursday, February 7, 2013

Holy Crap! Success!!

I cant believe I did it!                 I will try to put up video of it sometime soon :)
my program is working in the elephant!  It may not be the most eloquent and a real programmer would think it is messy, but it works!
and the working code is....
drum roll please...


int rcheek = 9;
int rear = 5;
int lcheek = 10;
int lear = 11;
int aluminumFoil = A5;
int brightness = 0; //how bright the led is
int fadeAmount = 5; //how many points to fade the led by
int sensorValue;  //variable stores readings from the sensor

void setup() {
    pinMode(rear, OUTPUT);
pinMode(rcheek, OUTPUT);
pinMode(lcheek, OUTPUT);
pinMode(lear, OUTPUT);
  pinMode(aluminumFoil, INPUT); //sets aluminum foil pin to INPUT
  digitalWrite(aluminumFoil, HIGH); //initializes the sensor
  Serial.begin(9600); //initializes the communication
}

void loop() {
  sensorValue = analogRead(aluminumFoil);
  Serial.println(sensorValue);
  delay(100); //delay for 1/10 of a second

 if (sensorValue < 990 && sensorValue > 895) // if touching sensor
 {
  analogWrite(rcheek, brightness);  
analogWrite (lcheek, brightness);

  // change the brightness for next time through the loop:
  brightness = brightness + fadeAmount;

  // reverse the direction of the fading at the ends of the fade:
  if (brightness == 0 || brightness == 255) {
    fadeAmount = -fadeAmount ;

 }
 }
  else if (sensorValue <= 895 && sensorValue > 750)
  {  digitalWrite (rcheek, LOW);
  digitalWrite (lcheek, LOW);
  digitalWrite (rear, HIGH);
  digitalWrite (lear, HIGH);
  delay (200);
 
  digitalWrite(rear, LOW); //turn the LED off
    digitalWrite(lear, LOW); //turn the LED off
    delay (200);
}
  else if (sensorValue <= 750)
  {{
     analogWrite(rcheek, brightness);  
analogWrite (lcheek, brightness);
 // change the brightness for next time through the loop:
  brightness = brightness + fadeAmount;

  // reverse the direction of the fading at the ends of the fade:
  if (brightness == 0 || brightness == 255) {
    fadeAmount = -fadeAmount ;

 };
 {digitalWrite (rear, HIGH);
  digitalWrite (lear, HIGH);
  delay (200);
 
  digitalWrite(rear, LOW); //turn the LED off
    digitalWrite(lear, LOW); //turn the LED off
    delay (200);
 }}}
 else
 {
   digitalWrite (rear, LOW);
   digitalWrite (lear, LOW);
   digitalWrite (rcheek, LOW);
   digitalWrite (lcheek, LOW);
  }
  }

Wednesday, February 6, 2013

Welcome to my most recent headache...


why yes.... that is written code...
why no....i do not understand it....
why yes... i do have to keep writing it. I need help!

Thursday, January 31, 2013

Recent Art..

So these first two pictures are of my sculpture. I don't absolutely love it, but I worked hard on it.
This thing weighs a ton thanks to all my hair :-p



This is my elephant in progress. I have all of the lights working, but I haven't done all the programming .. I'm still learning how to do that.

Tuesday, April 24, 2012

This explains so much!!!

So a friend of mine was editing a picture that she is using as a reference for an art project on the internet and when she went to save it this what came up...



















[it says... The hamster-in-a-treadmill inside your computer insists you add three letters to the end of every file name to indicate the format. Uppity rodent.]

Thursday, March 29, 2012

Good News!... and Bad News...

the good news is I got a job here in Cash Valley and Cain Dairy! The bad news is that it requires me to wake up at 3am... I guess I will just have to see how that goes.

Friday, November 18, 2011

USU vs BYU Basketball Game

So in 11-11-11 (last Friday) USU played BYU in basketball and so a big group of us went to it. It was a lot of fun and we totally won. It was a really good game.


People had been camping out for this game starting the Tuesday night before, but we just went and waited in line all day. I actually went to my classes (except the one that was during the game) but some of the people I went with missed some classes so that they could go and sit in line starting at like 7:00 that morning. It was great to spend time with a bunch of friends.




Monday, November 14, 2011

I just wanted to take a minuet to let my family know how much this gospel means to me. I love my Heavenly Father and my Savior so much and I know that they are always there for you! They never forget you. Heavenly Father wants to help you with all your goals and needs, but you need to ask him and be patient because it will be in him own time. The Holy Ghost is the greatest comforter there is. I love this gospel with all my heart and I know that it is true!