Wednesday, May 2, 2012

Project Update 4
So as of today I got a step further with the arduino. Understanding the basics is a large part of thsi small project that I personally really have to grasp before starting more significant things. Understanding that linking wires to ground then from ground to halfway across the breadboard was something I never even began to think about. As Chris Hawes sat next to me waiting to print something out, he also began to plug in LED's. We found that the difference between the slots 13, 12, 11, and 10 werew all very different. The voltage or something is completely wacked out. Some of the inputs had pulse modifiers on them and therefore left a completely spin on things. The code I had written did not seem to work on all the LED'S, althoug hit workede for 13 and 12. Here's the code I wrote:
void setup() {
  // put your setup code here, to run once:
  pinMode(13, OUTPUT);
  pinMode(12, OUTPUT);
}
void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(13, HIGH);  // set the LED on
  delay(1500);            // wait betweeen blinks
  digitalWrite(12, HIGH);
  delay(1000);
  digitalWrite(13, LOW);  // Turn LED off
  delay(1000);
  digitalWrite(12, LOW);
  delay(1500);
  digitalWrite(11, HIGH);
  delay(1500);
  digitalWrite(10, HIGH);
  delay(1000);
  digitalWrite(11, LOW);
  delay(1000);
  digitalWrite(10, LOW);
  delay(1500);
}

No comments:

Post a Comment