Arduino Uno for Prototyping

Bat

Liam Brady
NewPing_v1.9.1.zip

Ultrasonic sensors are distance sensors that use sound waves to detect how far away an object is. They send out high frequency bursts of sound and listen for its echo. They then determine how far away the object is based on how long it takes for the sound to return to the sensor. This variety requires an Arduino library to operate.


#include <NewPing.h>

#include <Servo.h>

Servo myservo;  // create servo object to control a servo


NewPing mysensor(5, 6, 200);


void setup() {

  myservo.attach(11);  // attaches the servo on pin 9 to the servo object


  Serial.begin(9600);

}


void loop() {

  int pingTime = mysensor.ping();


  int distance = mysensor.ping_in();


  int distance_cm = mysensor.ping_cm();


  if (distance < 2){

    myservo.write(179);

  }


  else{

    myservo.write(0);

  }

  Serial.println(distance);

}


        

Firefly

Ryan Ferguson

void setup() {

  Serial.begin(9600);

  pinMode(13, OUTPUT);

  pinMode(A0, INPUT_PULLUP);

}


void loop() {

  int brightness = analogRead(A0);

  if (brightness >= 400) {

    digitalWrite(13, HIGH);

  }

  else {

    digitalWrite (13, LOW);

  }

  Serial.println(brightness);

}

Rattlesnake

Ryan Ferguson

void setup() {

  Serial.begin(9600);

  pinMode(13, OUTPUT);

  pinMode(8, INPUT_PULLUP);

}


void loop() {

  if (digitalRead(8) == false) {

    digitalWrite(13, HIGH);

  }


  else {

    digitalWrite(13, LOW);

  }

  delay(30);

}

Exploring light as a medium

Keenan Gray

Light as a Medium

Just as electrical lighting technology altered people's lives historically and allowed them to extend daylight hours for work, reading etc, our goal will be to imagine how the lights can once again be a vehicle for altering lives of those around them.

Chase_LED.ino
Pulse_LED.ino
Show_LED.ino