Interaction-Design-in-The-Wild

View the Project on GitHub svonhauske/Interaction-Design-in-The-Wild

16 April 2019

Final Project: Week III

by Sofia von Hauske Valtierra

Changes from last week

Final 152

I initially thought about making this out of wood, plywood specifically. Plywood is durable and has cross-graining, which reduces the tendency of wood to split, it reduces expansion and shrinkage, and it makes the strength of the panel consistent across all directions. Instead of wood, since this will be out in the open, I decided to go with plastic for the actual prototype, because it will make it more durable when subjected to bad weather.

Final 151

The whole device was a lot bigger than I wanted, mostly because of the dispensing mechanism I came up with:

Final 153

The mechanism had to change completely for me to be able to shrink the whole thing. I decided to use a servo actuator that gives linear motion through rack and pinion movement.

b4a17783f01681ccc25858dcd89c555b_preview_featured

These are the dimensions I started out with:

Catapulta

This first ideation required:

As I was testing out my electronic components, I discovered that having one PIR sensor on top of the device was enough and that having 4, one on each side was unnecessary.

This week

Dimensions

Catapulta4

Renderings

Final 154

Final 155

Final 156

Final 157

Prototype Pictures

IMG_0474

IMG_2194

IMG_9380

Code

#include <SoftwareSerial.h>

#include "pitches.h"

//SERVO
#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>
Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();

#define SERVOMIN  120 // this is the 'minimum' pulse length count (out of 4096)
#define SERVOMAX  620 
int push = map(150, 0, 180, SERVOMIN, SERVOMAX);
int pull = map(0, 0, 180, SERVOMIN, SERVOMAX);
  
int launch = map(0, 0, 180, SERVOMIN, SERVOMAX);
int rest = map(90, 0, 180, SERVOMIN, SERVOMAX);

//SENSOR
const int sensor = 9;
int state = 0;
int val;

int ledPin = 13;

String readString;

void setup() 
{
  Serial.begin(9600);
    
  pinMode(sensor, INPUT); 
  pinMode(ledPin, OUTPUT); 
  
  pwm.begin();
  pwm.setPWMFreq(60);
  pwm.setPWM(0, 0, pull); 
  pwm.setPWM(1, 0, rest); 
  delay(500);
}
void loop() 
{ 
  //BLUETOOTH
  while (Serial.available()) 
  {
      delay(3);  
      char c = Serial.read();
      readString += c; 
  }
  
  if (readString.length() > 0) 
  {
      Serial.println(readString);
      
      if (readString == "on")     
      { 
          tone(8, NOTE_C4, 1000);
          state = 1;
          delay(500);
      }
      
      if (readString == "off")
      {
          digitalWrite(ledPin, LOW);
          state = 0;
      }
      
      readString = "";
  } 

//CATAPULT
  if (state == 1)
  {
     val = digitalRead(sensor);
     Serial.println(val);
     if (val == 1)
     {
          digitalWrite(ledPin, HIGH);
          pwm.setPWM(0, 0, push); 
          delay(500);
          pwm.setPWM(0, 0, pull); 
          delay(2000);
          pwm.setPWM(1, 0, launch); 
          delay(500);
          pwm.setPWM(1, 0, rest); 
          delay(500);
          state = 0;
     }
     delay(100);   
  }

}

Interaction

My interaction flow stayed the same.

Catapulta3

Zookeper: Activates the low-frequency sound through Bluetooth.

Fox: Hears the sound and tries to pin-point its location.

Device: Waits for movement.

Fox: Approaches device with either muzzle or by stamping close by.

Device: Detects movement, dispenses treat and launches it into the air like a flying insect.

Fox: Catches treat.

Video

Next Steps

Go to main page.