Category Archives: NMED – 3680B

Project #2: hybrid interaction.

20140304-142410.jpg20140310-105835.jpg20140310-105849.jpg

20140310-105903.jpg20140310-105927.jpg

In the images above you will see the construction of the ferris wheel as well as the main 2 sensors on the breadboard.

Coding for my project for all 3 sensors

#include <Servo.h>
Servo myServo;

int const potPin = A0;
int potVal;
int angle;
const int switchPin = 2;
const int motorPin = 9;
int switchState;
int lastswitchState = LOW;
int onOff = LOW;

//LEDsensor lighting coding in which changes the colors of the main LED light.

const int greenLEDPin = 12;
const int redLEDPin = 11;
const int blueLEDPin = 10;

const int  redSensorPin = A1;
const int  greenSensorPin = A2;
const int  blueSensorPin = A3;

int redValue = 0;
int greenValue = 0;
int blueValue = 0;

int redSensorValue = 0;
int greenSensorValue = 0;
int blueSensorValue = 0;

void setup() {
myServo.attach(8);

Serial.begin(9600);

//motor setup
pinMode(motorPin, OUTPUT);
pinMode(switchPin, INPUT);

//LED setup
Serial.begin(9600);

pinMode(greenLEDPin, OUTPUT);
pinMode(redLEDPin, OUTPUT);
pinMode(blueLEDPin, OUTPUT);
}
// Make sure the object and sensor does not loop.
void loop() {
potVal = analogRead(potPin);
Serial.print(“potVal: “);
Serial.print(potVal);

angle = map(potVal, 0, 1023, 0, 179);
Serial.print(“, angle: “);
Serial.print(angle);

myServo.write(angle);
delay(15);

switchState = digitalRead(switchPin);

redSensorValue = analogRead(redSensorPin);
delay(5);
greenSensorValue = analogRead(greenSensorPin);
delay(5);
blueSensorValue = analogRead(blueSensorPin);

Serial.print(“Raw Sensor Value \t Red: “);
Serial.print(redSensorValue);
Serial.print(“\t Green: “);
Serial.print(greenSensorValue);
Serial.print(“\t Blue: “);
Serial.print(blueSensorValue);

redValue = redSensorValue/4;
greenValue = greenSensorValue/4;
blueValue = blueSensorValue/4;

Serial.print(“mapped Sensor Value \t Red: “);
Serial.print(redValue);
Serial.print(“\t Green: “);
Serial.print(greenValue);
Serial.print(“\t Blue: “);
Serial.print(blueValue);

analogWrite(redLEDPin, redValue);
analogWrite(greenLEDPin, greenValue);
analogWrite(blueLEDPin, blueValue);

//this is for the motor code ON/OFF

if (switchState == HIGH && lastswitchState == LOW) {
if(onOff == LOW) {
onOff = HIGH;
}
else if(onOff == HIGH) {
onOff = LOW;
}
lastswitchState == HIGH;
if (switchState == LOW) {
lastswitchState = LOW;
}
}

digitalWrite(motorPin, onOff);
}

Advertisements

Coding for ardiuno projects

20140224-183534.jpg

20140224-183526.jpg

01.wpid-20140209_210448.jpgwpid-20140209_211953.jpgwpid-20140209_212017.jpg

02.

wpid-20140209_214933.jpg
int switchState = 0;
void setup () {
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(2,INPUT);
}
void loop(){
switchState = digitalRead(2);
//this is a comment

if (switchState == LOW){
digitalWrite(3, HIGH);//green LED
digitalWrite(4, LOW); // red LED
digitalWrite(5, LOW); //red LED
}

else { // the button is pressed
digitalWrite(3,LOW);
digitalWrite(4, LOW);
digitalWrite(5, HIGH);

delay(250); //wait for a quarter of a second
//toggl the LEDS
digitalWrite(4, HIGH);
digitalWrite(5, LOW);
delay(250); //wait for a quarter second
}
} // go back to the beggining of the loop

03. Love-o-meter

wpid-20140209_215849.jpg

const int sensorPin = A0;
const float baselineTemp = 20.0;
void setup(){
Serial.begin(9600); //open a serial port
for(int pinNumber = 2; pinNumber<5; pinNumber++){
pinMode(pinNumber,OUTPUT);
digitalWrite(pinNumber, LOW);
}
}

void loop(){
int sensorVal = analogRead(sensorPin);
Serial.print(“Sensor Value: “);
Serial.print(sensorVal);

//convert the ADC reading to voltage
float voltage = (sensorVal/1024.0) *50;
Serial.print(“, Volts: “);
Serial.print(voltage);
Serial.print(“, degrees C: “);
//convert the voltage to temperature in degrees
float temperature = (voltage – .5) * 100;
Serial.println(temperature);

if(temperature < baselineTemp){
digitalWrite(2, LOW);
digitalWrite(3, LOW);
digitalWrite(4, LOW);
}else if(temperature >=baselineTemp+2 &&
temperature <baselineTemp+4){
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
digitalWrite(4, LOW);
}else if (temperature >=baselineTemp+6){
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
digitalWrite(4, LOW);
}
delay(1);
}
04. Color mixing lamp

wpid-20140209_231140.jpg

const int greenLEDPin = 9;
const int redLEDPin = 11;
const int blueLEDPin = 10;

const int redSensorPin = A0;
const int greenSensorPin = A1;
const int blueSensorPin = A2;

int redValue = 0;
int greenValue = 0;
int blueValue =0;

int redSensorValue = 0;
int greenSensorValue = 0;
int blueSensorValue= 0;

void setup(){
Serial.begin(9600);
pinMode(greenLEDPin, OUTPUT);
pinMode(redLEDPin, OUTPUT);
pinMode(blueLEDPin, OUTPUT);
}

void loop(){
redSensorValue = analogRead(redSensorPin);
delay(5);
greenSensorValue = analogRead(greenSensorPin);
delay(5);
blueSensorValue = analogRead(blueSensorPin);
Serial.print(“Raw Sensor Values \t Red: “);
Serial.print(redSensorValue);
Serial.print(“\t Green: “);
Serial.print(greenSensorValue);
Serial.print(“\t Blue: “);
Serial.print(blueSensorValue);
redValue = redSensorValue/4;
greenValue = greenSensorValue/4;
blueValue = blueSensorValue/4;

Serial.print(“Mapped Sensor Values \t Red: “);
Serial.print(redValue);
Serial.print(“\t Green: “);
Serial.print(greenValue);
Serial.print(“\t Blue: “);
Serial.print(blueValue);
analogWrite(redLEDPin, redValue);
analogWrite(greenLEDPin, greenValue);
analogWrite(blueLEDPin, blueValue);
}0

05. Mood Cue

wpid-20140210_001803.jpg

#include <Servo.h>
Servo myServo;

int const potPin =A0;
int potVal;
int angle;
void setup() {
myServo.attach(9);

Serial.begin(9600);
}

void loop() {
potVal = analogRead(potPin);
Serial.print(“potVal: “);
Serial.print(potVal);
angle = map(potVal, 0, 1023, 0, 179);
Serial.print(“, angle: “);
Serial.println(angle);

myServo.write(angle);
delay(15);
}

06. Light theremin

wpid-20140210_003245.jpg

int sensorValue;
int sensorLow =1023;
int sensorHigh = 0;

const int ledPin = 13;
void setup(){
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, HIGH);
while (millis() < 5000) {
sensorValue = analogRead(A0);
if (sensorValue > sensorHigh) {
sensorHigh = sensorValue;
}
if (sensorValue < sensorLow) {
sensorLow = sensorValue;
}
}

digitalWrite(ledPin, LOW);
}

void loop (){
int pitch =
map(sensorValue, sensorLow, sensorHigh, 50, 4000);

tone(8,pitch,20);
delay(10);
}

07. Keyboard instrument

wpid-20140210_005522.jpg

int buttons[6];
//set up an array with 6 integers

int notes[] = {262,294,330,349};

void setup() {
Serial.begin(9600);
}

void loop() {
int keyVal = analogRead(A0);
Serial.println(keyVal);
if(keyVal ==1023){
tone(8, notes[0]);
}

else if (keyVal >= 990 && keyVal <= 1010){
tone(8, notes[1]);
}
else if(keyVal >= 505 && keyVal <= 515){
tone(8, notes[2]);
}
else if(keyVal = 5 && keyVal <= 10){
tone(8, notes[3]);
}
else{
noTone(8);
}
}

08. Did not need to complete

09. Motorized pinwheel

const int switchPin = 2;
const int motorPin = 9;
int switchState = 0;

void setup() {
pinMode(motorPin, OUTPUT);
pinMode(switchPin, INPUT);
}

void loop(){
switchState = digitalRead(switchPin);

if (switchState == HIGH) {
digitalWrite(motorPin, HIGH);
}
else {
digitalWrite(motorPin, LOW);
}
}

10. Zoetrope

wpid-20140210_151135.jpg wpid-20140210_153534.jpg

11. Crystal Ball

wpid-Snapchat-20140210042932.jpg

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

const int switchPin = 6;
int switchState = 0;
int prevSwitchState = 0;
int reply;

void setup() {
lcd.begin(16, 2);
pinMode(switchPin,INPUT);
lcd.print(“Ask the”);

lcd.setCursor(0, 1);
lcd.print(“Crystal Ball!”);
}

void loop() {
switchState = digitalRead(switchPin);

if (switchState != prevSwitchState) {
if (switchState == LOW) {
reply = random(8);

lcd.clear();
lcd.setCursor(0, 0);
lcd.print(“The Ball says:”);
lcd.setCursor(0, 1);
switch(reply){
case 0:
lcd.print(“yes”);
break;
case 1:
lcd.print(“Most Likely”);
break;
case 2:
lcd.print(“Certainly”);
break;
case 3:
lcd.print(“Outlook good”);
break;
case 4:
lcd.print(“unsure”);
break;
case 5:
lcd.print(“ask again”);
break;
case 6:
lcd.print(“doubtful”);
break;
case 7:
lcd.print(“NO”);
break;
}
}
}
prevSwitchState = switchState;
}

12. Knock Lock

wpid-Snapchat-20140210050917.jpg

#include <Servo.h>
Servo myServo;
const int piezo = A0;
const int switchPin = 2;
const int yellowLed = 3;
const int greenLed = 4;
const int redLed = 5;

int knockVal;
int switchVal;

const int quietKnock = 10;
const int loudKnock = 100;

boolean locked = false;
int numberOfKnocks = 0;

void setup(){
myServo.attach(9);
pinMode(yellowLed, OUTPUT);
pinMode(redLed, OUTPUT);
pinMode(greenLed, OUTPUT);
pinMode(switchPin, INPUT);
Serial.begin(9600);
digitalWrite(greenLed, HIGH);
myServo.write(0);
Serial.println(“the box is unlocked!”);
}

void loop(){
if(locked == false){
switchVal = digitalRead(switchPin);
if(switchVal == HIGH){
locked = true;
digitalWrite(greenLed, LOW);
digitalWrite(redLed, HIGH);
myServo.write(90);
Serial.println(“The box is locked!”);
delay (1000);
}
}

if(locked == true){
knockVal = analogRead(piezo);
if(numberOfKnocks < 3 && knockVal > 0){
if(checkForKnock(knockVal) == true){
numberOfKnocks++;
}
Serial.print(3-numberOfKnocks)

;
Serial.println(“more knocks to go”);
}
if(numberOfKnocks >= 3){
locked = false;
myServo.write(0);
delay(20);
digitalWrite(greenLed,HIGH);
digitalWrite(redLed,LOW);
Serial.println(“the box is unlocked!”);
}
}
}
boolean checkForKnock(int value){
if(value > quietKnock && value < loudKnock){
digitalWrite(yellowLed, HIGH);
delay(50);
digitalWrite(yellowLed,LOW);
Serial.print(“valid knock of value”);
Serial.print(value);
return true;
}
else {
Serial.print(“bad knock value”);
Serial.println(value);
return false;
}
}

13. touchy feely lamp

wpid-20140222_001001.jpg

I could not figure out how to get this one to work the coding was not working no matter what way I had gone about it. I had set it all up but could not get the coding to go through

int threshold = 1000;
const int ledPin = 12;

void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
}
void loop() {
long sensorValue = capSensor.capacitiveSensor(30);
Serial.println(sensorValue);

if(sensorValue > threshold) {
digitalWrite(ledPin, HIGH);
}
else {
digitalWrite, LOW);
}
delay(10);
}

14.wpid-20140221_235147.jpg

void setup() {
Serial.begin(9600);
}
void loop() {
Serial.write(analogRead(A0)/4);
delay(1);
}

image processing.serial.*;
Serial myPortl
PImage logo;
int bgcolor = 0;
void setup() {
colorMode(HSB, 225);
logo = loadImage(“http://arduino.cc/logo/png&#8221;);
size(logo.width, logo.height);
println(“Available serial ports:”);
println(Serial.list());
myPort =
new Serial(this, Serial.list()[10], 9600);
}
void draw() {
if (myPort.available() > 0) {
bgcolor = myPort.read();
println(bgcolor);
}
background(bgcolor, 255, 255);
image(logo, 0, 0);
}

same thing happened with this, while entering in the code the parts that should had lit up remained darkened then while trying to fit in the code, it would not produce the code needed to continue with the coding itself.

20140224-183509.jpg

20140224-183520.jpg

Get the facts

http://www.theatreoutre.ca/about-us/venue/

After reading this it really blew my mind a little bit. Living in Lethbridge has been extremely hard over the years. I cannot believe how much hate is within the Lethbridge area towards others.

Week 4: POP UP BOOK POST

This pop up assignment was interesting it allowed me to explore a whole new way to interact with something as simple as paper. It created the equation that if you do this, that will happen while making it fun and interesting. I took a little bit of a different approach with this in the way that I made it interactive I did however struggle a little bit with coming up with a solid idea and going with it as many of my initial ideas did not pan out the way I had imagined them in my head and drawn out on paper. 😦

!
Where? :: Why this structure? What made you settle on the idea you did?!

I really enjoyed the castle theme, I was discussing with a friend Game of Thrones which triggered some different ideas such as sleeping beauty, snowwhite and everything I really enjoyed as a child. I drew some different ideas in which I wanted to incorporate into my design.
How? :: Directing us to the appropriate photos (see below) talk about your construction process.

I began with my prototype designing how I wanted to construct my book I think this was the most important step without a foundation I was unable to build upon my idea and lay things out. I had completely forgotten to take any photos of my final attempt of construction I do however have a picture from a friend of me clearly loving every moment of my design.
Problems? Solutions? What would you do differently next time?!

Problems that I most commonly ran into was the fact that once you cut paper its really hard to fix that mistake. I got stuck with the construction of my first page, initially I wanted to include a door on the castle but that however did not work the way I intended so I instead decided on a moon. Now the process in which I had to follow to get that done was tricky to find something that was strong enough to keep the momentum of the moon without it getting stuck so it could fluidly move back and forth. I settled on using a pipe cleaner initially and that was too flimsy so I had to put something around that to support it. The only thing I could find that would remotely work would be a straw in which gives it a bit more support to the pushing and pulling motion. If I had thought about it previously I would have instead used a stronger wire or something slightly smaller. I had an idea with a mirror and again that did not pan out either as the tin foil I was intending on using was not reflective enough and would not work for the purpose it which I wanted it to serve. I would have liked to have done it but with the lack of materials handy it was difficult to pull that one off.
Who? :: Discuss your intended audience.!

My intended audience would be a younger audience as this is so simple and child like I do believe if I were to put a target audience it would be ages between 3-6 years of age.

Why? :: Speak to the interactive capabilities of paper engineering generally, as well as your
book specifically. What is our attraction to these objects?!

I couldn’t think of anything super crazy to do however I kind of switched up the interactivity that I used it is so generic to just use the push and pull and I wanted to do something a little bit different. On page two I used a wax paper in which I put over top of the text, to give the audience a chance to really explore by seeing and touching. Doing this allows the audience to read some text that I had put under the wax paper. The audience needs to move the paper around in order to make out the poem that is located beneath the paper.

The 3rd page kind of didn’t work out the way I had initially intended however I wanted to keep with the castle type theme which a big giant old clock in which allows you to move the hands on the clock is fun and kind of gave me the idea that what you do with the time is up to you.. just kind of how life plays out – what you decide to do with your time is up to you. Then I wanted to continue with the child theme including a mouse but first a little riddle with painted on foot prints to where you’ll find the little mouse hiding under the other flap, and the audience gets a little surprise when they find the little mouse hiding.

20140127_130937 20140127_131014 20140127_1310452014-01-27 13.07.14

 

Prototype

20140121_004629 20140121_004636 20140121_004642

 

week 3 blog entry

This week we had a discussion on Monday regarding the reading that assigned and then watched video regarding the creation of design through a random process. Also throughout this week I started on my prototype for my pop up book design currently my ideas are all over the place with what I want the end product to be like and what to include. Who knew folding a book could be so complex and stressful. I never want to be a pop up book artist.

Interaction Design Sketchbook Response

I am going to be honest I struggled pulling away an understanding of this reading but I tried my best. This reading was a little hard to follow so I had to go through it a couple different times locating and writing specific things that really stood out to me in this piece of writing. The first thing that stood out to me was the fact that he had discussed how computers were changing the process of design where things are so easily manipulated, considered the craft process. There is no time to essentially sit back plan and analyze the results of the work. Is this because people demand results immediately with very little trial and error?

The way that the author gives metaphorical understanding on each different process of interaction is interesting because it gives you a different approach of understanding what each section. The labels that were given were BRAIN, TOOL, MEDIA, LIFE, VEHICLE, FASHION relating each one to human interactions and how it relates to interaction.

How much do these labels actually impact our every day activities on how we interact with different technology?How easily are we influenced by and with computers in every day life?

Is it easier to understand symbolically/metaphorically? at what age do you think this was important to us?

Do you believe that computers enhance itelligence? or motivate manipulation empowerment? and embrace more media entertainment? Is it because technology makes it easier for the viewer? or just adaptation of the current age?

Week 1/2 blog entry

Within these first few classes we were introduced to what we would be introduced to throughout this semester from the very beginning of interaction to where we are currently in 2014 of what is considered interactive. We were assigned “what is interactivity?” this article really stressed the idea of different views of what is considered interactive from different peoples perspectives. Once the reading was done and the final statement was made the thing that really stood out to me was the fact that once something is common nature and we just do it instinctively it is actually no longer interactive because you are no longer learning anything from what you are interactive with and it is no longer considered a surprise or cognitively new to our minds.

We had a group discussion on Monday discussing this article with the rest of the class and something that was brought up was the difference between what is controlling and what is interactive! this is an interesting thought. When interacting with something we are essentially controlling it with the way we are interacting with it.

The animated hologram of the dog which moved with your movement is was brought up that it could be controlled by the person however you are encouraged to interact while controlling the dogs movement. Now hypothetically you now can touch this animal and feel something by touching this, does this now change it from controlled to interactive? and how? this may change the entire experience of the subject that is in the process of interacting with it by touch…

Wednesday we were introduced to the notion of pop up books now these have been around for years however there is always interest as a child to an adult that if you do a + b you’ll get c. or if you do something it will result in this. It creates a level of curiosity with the subject (s) that are taking apart in the interactive process. Pop up books are interesting and give another level of interest within the viewer.

What is Interactivity?

Throughout this reading it was justifying what defined interactivity. There was many different opinions on what defined this. Many of the different theorists touched barely on what they considered to be interactive. The writer aclaims that once you have mastered the trick of being fully interactive for instance the idea of understanding pacman and how to avoid the ghosts, once you’ve figured that out it no longer is considered interactive.  The questions that I had managed to come with were as follows:

Must you feel rewarded for interacting with something? Is getting positive feedback just a bonus of the interaction process?

To what degree must interaction be in order to be considered interactive?