Making Toys – For April 9th
Make and Post 7 Prototypes for your concept(s).
2-3 Role Specific Protos
2-3 Detailed Look and Feel Protos
2-3 Implementation Protos
–ALSO post your Venn Diagrams into your First Prototypes Post.
Make and Post 7 Prototypes for your concept(s).
2-3 Role Specific Protos
2-3 Detailed Look and Feel Protos
2-3 Implementation Protos
–ALSO post your Venn Diagrams into your First Prototypes Post.
Make One Blog Post with:
Your project name, a 3-8 sentence project summary, of one photo of your project, one photo of your project with a user, and one video as below.
Video Requirements:
Make a 90-120 second that shows your project. Communicate your project vision with your prototype. At some point you should state explicitly if your video is showing a integrated prototype, or a look and feel prototype.
Your video should have:
1) Your project name
2) Your name
3) Show the interaction with a user, from start to finnish
4) have 10-30 seconds on the technology used.
Note: User voice over to communicate idea. Video should not be over 180 seconds max, and 120 is recommended longest length.
//—————————————————
//—————————————————
// Output
int redPin = 3; // Red LED, connected to digital pin 9
int greenPin = 5; // Green LED, connected to digital pin 10
int bluePin = 6; // Blue LED, connected to digital pin 11
// Program variables
int redVal = 1; // Variables to store the values to send to the pins
int greenVal = 1; // Initial values are Red full, Green and Blue off
int blueVal = 1;
int i = 0; // Loop counter
int j =0 ;
int jOld = 0;
int wait = 50; // 50ms (.05 second) delay; shorten for faster fades
int DEBUG = 0; // DEBUG counter; if set to 1, will write values back via serial
//—————————————————
//—————————————————
long Hxv[4]; // these arrays are used in the digital filter
long Hyv[4]; // H for highpass, L for lowpass
long Lxv[4];
long Lyv[4];
unsigned long readings; // used to help normalize the signal
unsigned long peakTime; // used to time the start of the heart pulse
unsigned long lastPeakTime = 0;// used to find the time between beats
volatile int Peak; // used to locate the highest point in positive phase of heart beat waveform
int rate; // used to help determine pulse rate
volatile int BPM;
// used to hold the pulse rate
int offset = 0; // used to normalize the raw data
int sampleCounter; // used to determine pulse timing
int beatCounter = 1; // used to keep track of pulses
volatile int Signal; // holds the incoming raw data
int NSignal; // holds the normalized signal
volatile int FSignal; // holds result of the bandpass filter
volatile int HRV; // holds the time between beats
volatile int Scale = 13; // used to scale the result of the digital filter. range 12<>20 : high<>low amplification
volatile int Fade = 0;
boolean first = true; // reminds us to seed the filter on the first go
volatile boolean Pulse = false; // becomes true when there is a heart pulse
volatile boolean B = false; // becomes true when there is a heart pulse
volatile boolean QS = false; // becomes true when pulse rate is determined. every 20 pulses
int pulsePin = 0; // pulse sensor purple wire connected to analog pin 0
void setup(){
pinMode(13,OUTPUT); // pin 13 will blink to your heartbeat!
Serial.begin(115200); // we agree to talk fast!
// this next bit will wind up in the library. it initializes Timer1 to throw an interrupt every 1mS.
TCCR1A = 0x00; // DISABLE OUTPUTS AND BREAK PWM ON DIGITAL PINS 9 & 10
TCCR1B = 0x11; // GO INTO ‘PHASE AND FREQUENCY CORRECT’ MODE, NO PRESCALER
TCCR1C = 0x00; // DON’T FORCE COMPARE
TIMSK1 = 0x01; // ENABLE OVERFLOW INTERRUPT (TOIE1)
ICR1 = 8000; // TRIGGER TIMER INTERRUPT EVERY 1mS
sei(); // MAKE SURE GLOBAL INTERRUPTS ARE ENABLED
pinMode(redPin, OUTPUT); // sets the pins as output
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop(){
Serial.print(“S”); // S tells processing that the following string is sensor data
Serial.println(Signal);
Serial.print(” BPM: “);
Serial.println(BPM);
if (B == true){ // B is true when arduino finds the heart beat
Serial.print(“B”); // ‘B’ tells Processing the following string is HRV data (time between beats in mS)
Serial.println(HRV); // HRV holds the time between this pulse and the last pulse in mS
B = false; // reseting the QS for next time
}
if (QS == true){ // QS is true when arduino derives the heart rate by averaging HRV over 20 beats
Serial.print(“Q”); // ‘QS’ tells Processing that the following string is heart rate data
Serial.println(BPM); // BPM holds the heart rate in beats per minute
QS = false; // reset the B for next time
}
// Fade -= 15;
// Fade = constrain(Fade,0,255);
// analogWrite(11,Fade);
//—————————————————
//—————————————————
i = BPM;
// i = (j+jOld)/2;
// Serial.println(“j”);
// Serial.println(j);
// Serial.println(“jOld”);
// Serial.println(jOld);
//
// Serial.println(“i”);
// Serial.println(i);
if (i < 70) // First phase of fades
{
analogWrite (redPin, 0);
analogWrite (greenPin, 0);
analogWrite (bluePin, 255);
}
else if (i > 70 && i <= 85) // Second phase of fades
{
analogWrite (redPin, 0);
analogWrite (greenPin, 255);
analogWrite (bluePin, 0);
}
else if (i > 85 ) // Third phase of fades
{
analogWrite (redPin, 255);
analogWrite (greenPin,0 );
analogWrite (bluePin, 0);
}
else // Re-set the counter, and start the fades again
{
jOld = j;
Serial.println(j);
Serial.println(jOld);
Serial.println(i);
}
// analogWrite(redPin, redVal); // Write current values to LED pins
// analogWrite(greenPin, greenVal);
// analogWrite(bluePin, blueVal);
//—————————————————
//—————————————————
delay(20); // take a break
}
// THIS IS THE TIMER 1 INTERRUPT SERVICE ROUTINE. IT WILL BE PUT INTO THE LIBRARY
ISR(TIMER1_OVF_vect){ // triggered every time Timer 1 overflows
// Timer 1 makes sure that we take a reading every milisecond
Signal = analogRead(pulsePin);
// First normailize the waveform around 0
readings += Signal; // take a running total
sampleCounter++; // we do this every milisecond. this timer is used as a clock
if ((sampleCounter %300) == 0){ // adjust as needed
offset = readings / 300; // average the running total
readings = 0; // reset running total
}
NSignal = Signal – offset; // normalizing here
// IF IT’S THE FIRST TIME THROUGH THE SKETCH, SEED THE FILTER WITH CURRENT DATA
if (first = true){
for (int i=0; i<4; i++){
Lxv[i] = Lyv[i] = NSignal <<10; // seed the lowpass filter
Hxv[i] = Hyv[i] = NSignal <<10; // seed the highpass filter
}
first = false; // only seed once please
}
// THIS IS THE BANDPAS FILTER. GENERATED AT www-users.cs.york.ac.uk/~fisher/mkfilter/trad.html
// BUTTERWORTH LOWPASS ORDER = 3; SAMPLERATE = 1mS; CORNER = 5Hz
Lxv[0] = Lxv[1];
Lxv[1] = Lxv[2];
Lxv[2] = Lxv[3];
Lxv[3] = NSignal<<10; // insert the normalized data into the lowpass filter
Lyv[0] = Lyv[1];
Lyv[1] = Lyv[2];
Lyv[2] = Lyv[3];
Lyv[3] = (Lxv[0] + Lxv[3]) + 3 * (Lxv[1] + Lxv[2])
+ (3846 * Lyv[0]) + (-11781 * Lyv[1]) + (12031 * Lyv[2]);
// Butterworth; Highpass; Order = 3; Sample Rate = 1mS; Corner = .8Hz
Hxv[0] = Hxv[1];
Hxv[1] = Hxv[2];
Hxv[2] = Hxv[3];
Hxv[3] = Lyv[3] / 4116; // insert lowpass result into highpass filter
Hyv[0] = Hyv[1];
Hyv[1] = Hyv[2];
Hyv[2] = Hyv[3];
Hyv[3] = (Hxv[3]-Hxv[0]) + 3 * (Hxv[1] – Hxv[2])
+ (8110 * Hyv[0]) + (-12206 * Hyv[1]) + (12031 * Hyv[2]);
FSignal = Hyv[3] >> Scale; // result of highpass shift-scaled
//PLAY AROUND WITH THE SHIFT VALUE TO SCALE THE OUTPUT ~12 <> ~20 = High <> Low Amplification.
if (FSignal >= Peak && Pulse == false){ // heart beat causes ADC readings to surge down in value.
Peak = FSignal; // finding the moment when the downward pulse starts
peakTime = sampleCounter; // recodrd the time to derive HRV.
}
// NOW IT’S TIME TO LOOK FOR THE HEART BEAT
if ((sampleCounter %20) == 0){// only look for the beat every 20mS. This clears out alot of high frequency noise.
if (FSignal < 0 && Pulse == false){ // signal surges down in value every time there is a pulse
Pulse = true; // Pulse will stay true as long as pulse signal < 0
digitalWrite(13,HIGH); // pin 13 will stay high as long as pulse signal < 0
Fade = 255; // set the fade value to highest for fading LED on pin 11 (optional)
HRV = peakTime – lastPeakTime; // measure time between beats
lastPeakTime = peakTime; // keep track of time for next pulse
B = true; // set the Quantified Self flag when HRV gets updated. NOT cleared inside this ISR
rate += HRV; // add to the running total of HRV used to determine heart rate
beatCounter++; // beatCounter times when to calculate bpm by averaging the beat time values
if (beatCounter == 7){ // derive heart rate every 10 beats. adjust as needed
rate /= beatCounter; // averaging time between beats
BPM = 60000/rate; // how many beats can fit into a minute?
beatCounter = 0; // reset counter
rate = 0; // reset running total
QS = true; // set Beat flag when BPM gets updated. NOT cleared inside this ISR
}
}
if (FSignal > 0 && Pulse == true){ // when the values are going up, it’s the time between beats
digitalWrite(13,LOW); // so turn off the pin 13 LED
Pulse = false; // reset these variables so we can do it again!
Peak = 0; //
}
}
}// end isr
Make 10 from below. Number each, present in class.
3 Look and Feel Prototypes
3 Role Prototypes
3 Implementation Prototypes
3 Examples of Prior Art
Link for in-class reference.
http://www.sparkfun.com/search/results?term=wireless+arduino&what=products
Also
Arduino
http://asynclabs.com/store?page=shop.product_details&flypage=flypage.tpl&product_id=29&category_id=6
Supplies for fabric and stuffing are in the last cabinet in pcomp lab. With sign on it “for wireless class only”. Please take what you need an leave materials for others. But feel free to use it all if you are the last person.
Create a Bio-Feedback Experience.
Description: Use Heart-rate to create a Bio-feedback artifact/experience which allows a user(s) to understand and interact with their heart-rate.
Pick One:
1) Single User: User should understand if their heart-rate increases or decrease. There should be a “feedback” loop in the experience, in which the user is able to gain skills to control their heart-rate up or down. [Can work in team of 2, One Integrated Prototype per person required.]
2) Multi User: Create an experience/artifacts in which more then one users can sync their heart-rate, learn to control their heart-rate, or use their heartbeats in a play experience. [Can work in a team of 2 or 3. One Integrated Prototype per person required.]
Project Requirements:
Project should be fully enclosed and battery operated.
Monday 19th- Present 1-2 Implementation Prototype(s), 1-2 Look and Feel Prototype(s), and 1-2 Role Prototype(s).
Thursday 22- Present 1-2 Implementation Prototype(s), 1-2 Look and Feel Prototype(s), and 1-2 Role Prototype(s).
Monday 26th- Present final Integrated Prototype.
Thursday 29th- Document Project with 2 minute video.
https://docs.google.com/document/d/1ZeaoKg2Gu-MnUz8zR4tOv1x-YcpqBAQQ3N9J-9Adzow/edit
Make a “Living Light Object”
Create an enclosure (of any material) that diffuses and hides your LEDs (and optionally your Arduino).
Using If and Else If, create 3 different LED Animations. The 3 animations should be Keyboard controlled. The three animations should show 3 different states:
1) Waking Up, or Alert
2) Falling Asleep, or Soothing
3) Think or Chaos
Use If statements, Knighrider, and Fading LED code to make your 3 animations. Your enclosure should not expose that LED’s are creating the light, but should instead be itself the light source. Concentrate on the use of Light, Color, and Time to recreate the illusion of life.
On the blog it says that the assignment is due on the 21st but in class you had said that it was due the 16th. When would you like for us to have the enclosed LED ready for?
Make an “Emotional Box”
Create an enclosure that diffuses and hides your LEDs (and Arduino).
Using If and Else If, create 3 different LED Animations. The 3 animations should be Keyboard controlled. The three animations should show 3 different states:
1) Waking Up, or Alert
2) Falling Asleep, or Soothing
3) Think or Random Activity
Use Sketch 6-01 from Programming Arduino along with Knighrider and Fading LED code to make your 3 animations. Recommended enclosure is a plexiglass box with paper to diffuse the light.
Parts List, Spring 2012
1) Arduino UNO, 1 unit: [from any where]
http://www.sparkfun.com/products/11021
——————-
2) Break Away Headers – Straight sku: PRT-00116
http://www.sparkfun.com/products/116
5 x pcs
——————-
3) usb a-to-b cable for arduino
——————-
4a)
Jumper Wires Premium 12″ M/M Pack of 10
http://www.sparkfun.com/products/9387
1 or 2 pack
and
4b) Jumper Wires Premium 12″ F/F Pack of 10
http://www.sparkfun.com/products/9389
1 Pack
——————-
5) Breadboard
http://www.sparkfun.com/products/9567
3 x pcs
——————-
6)
3 x Super Bright Red LED
3 x Super Bright Green LED
3 x Super Bright Yellow LED
3 x Super Bright Blue LED
http://www.sparkfun.com/search/results?term=super+bright+led&what=products
——————-
7)
Long Nosed Pliers
http://www.sparkfun.com/products/10392
——————-
8)
WireWrap Tool, 1 pcs
http://parts.digikey.com/1/parts/996035-tool-wrap-strip-unwrap-mod-30awg-wsu-30m.html
or
http://parts.digikey.com/1/parts/996034-tool-wrap-strip-unwrap-reg-30awg-wsu-30.html
——————-
9)
Wire Warp Spool, 1 x Red, 1 x Black, 1 x Green
http://www.sparkfun.com/search/results?term=wire+wrap+spool&what=products
——————-
10)
Speaker, 3 pcs
http://www.sparkfun.com/products/10722
——————-
11)
Use First Class Mail for shipping option. You’ll have is in 1 or 2 business days.
Read:
1)
THE COMING AGE OF CALM TECHNOLOGY
http://www.johnseelybrown.com/calmtech.pdf
or
http://nano.xerox.com/hypertext/weiser/acmfuture2endnote.htm
————————–
2) Arduino Intro:
http://arduino.cc/en/Guide/Introduction
————————–
3) Arduino Hook-up for your OS
http://arduino.cc/en/Guide/HomePage
————————–
3) Programming Environment
http://arduino.cc/en/Guide/Environment
Parts List, Spring 2012
1) Arduino UNO, 1 unit: [from any where]
http://www.sparkfun.com/products/11021
——————-
2) Break Away Headers – Straight sku: PRT-00116
http://www.sparkfun.com/products/116
5 x pcs
——————-
3) usb a-to-b cable for arduino
——————-
4a)
Jumper Wires Premium 12″ M/M Pack of 10
http://www.sparkfun.com/products/9387
1 or 2 pack
and
4b) Jumper Wires Premium 12″ F/F Pack of 10
http://www.sparkfun.com/products/9389
1 Pack
——————-
5) Breadboard
http://www.sparkfun.com/products/9567
3 x pcs
——————-
6)
3 x Super Bright Red LED
3 x Super Bright Green LED
3 x Super Bright Yellow LED
3 x Super Bright Blue LED
http://www.sparkfun.com/search/results?term=super+bright+led&what=products
——————-
7)
LV-EZ1 shield
http://www.sparkfun.com/products/639
——————-
8)
WireWrap Tool, 1 pcs
http://parts.digikey.com/1/parts/996035-tool-wrap-strip-unwrap-mod-30awg-wsu-30m.html
or
http://parts.digikey.com/1/parts/996034-tool-wrap-strip-unwrap-reg-30awg-wsu-30.html
——————-
9)
Wire Warp Spool, 1 x Red, 1 x Black, 1 x Green
http://www.sparkfun.com/search/results?term=wire+wrap+spool&what=products
——————-
10)
Speaker, 3 pcs
http://www.sparkfun.com/products/10722
——————-
https://docs.google.com/document/d/1d8P0wjMs1ut5hAYe9-7SNjbTjch9PUIfqNmXTvcFnyw/edit
Oct 11: LOL homework,
Make an enclosure of your screen LOL that diffuses the light. Create software that uses dynamic scrolling text and a interactive activated animation.
Buy second Arduino
Nov 18: Show twitting Displays, Homework. Pulse Sensor and Sound group present.
Make either: A project the displays the HeartRate in a physical form (can be LOL) OR Make a Sound Message Box with 2-3 switches and 2-3 LED’s.
Nov 25: Thanks Giving No Class
Dec 2: Present Homework. Do the second assignment.
Dec 9: Present prototypes for review.
Dec 16: Presentation 2 project to guest crits.
I believe there might be a problem with that sketch- just because of the name…I tried correcting it but it would not let me.
What do you suggest?
Hi All,
I’m just reviewing to make sure everyone is on the same page.
In the next class you are coming in with you WORKING project. You DO need blog post documenting your project.
The working project is do next class. The blog post can be turned in the following class. BUT, it’s always easier to document while your project still works well and is fresh to the mind.
The Blog Post should have:
1) Project Name
2) A photo of the electronics
3) A photo of the final project
4) A short video demonstrating it. [More in video below]
5) The code you used.
Regarding the video, it should:
Be 60-90 seconds long.
Contain the project title [either with a graphic or via voice over)
Demonstrate the concept and function.
This does not have to be a perfect “Pixar-quality” video. It just needs to contain the above. It can be done very well with a careful long-take, with a voice over.
The video should be posted on Vimeo or google and then embedded in to
Bring to next class:
1) The LOL Shield. We will be soldering them.
2) A power strip if you have one. I’ll try to bring one too.
Reply