Maggie George
Created October 26, 2015

Homework 6: Vehicle Prototype, 3D Printed Ring, Nametag

For this homework, I created three vehicle prototypes, a two-part 3D printed ring, and a fancy name tag.

Showcase (no instructions)37
Homework 6: Vehicle Prototype, 3D Printed Ring, Nametag

Story

Read more

Code

Mysterious Code

C/C++
int timer = 100;           // The higher the number, the slower the timing.

void setup() {
  // use a for loop to initialize each pin as an output:
  for (int thisPin = 2; thisPin < 9; thisPin++) {
    pinMode(thisPin, OUTPUT);
  }
}

void loop() {
  // loop from the lowest pin to the highest:
  for (int thisPin = 2; thisPin < 7; thisPin++) {
    // turn the pin on:
    digitalWrite(thisPin, HIGH);
    delay(timer);
    // turn the pin off:
    digitalWrite(thisPin, LOW);
  }

  // loop from the highest pin to the lowest:
  for (int thisPin = 7; thisPin >= 2; thisPin--) {
    // turn the pin on:
    digitalWrite(thisPin, HIGH);
    delay(timer);
    // turn the pin off:
    digitalWrite(thisPin, LOW);
  }}

Credits

Maggie George

Maggie George

9 projects • 5 followers

Comments