Author Archives: alex

Midterm

 

 

 

 

For my midterm I decided to make a music box. In order to do this, I had to purchase a wave shield that would let me play an mp3. I wanted an actual music box, so I also added a motor to make a figurine in the center of the box spin, a few LED’s to make it look nice, and I decorated the box. Lastly, I added a light sensor to make it so that they music box would turn on when opened, and turn off once you closed the lid. This was my process in pictures.

Step 1

SAMSUNG

 

Step 2

SAMSUNG

Step 3

SAMSUNG

step 4

SAMSUNG

step 5

SAMSUNG

step 6

SAMSUNG

Videos

video 1
video 2
video 3

Lol shield

#include <Charliplexing.h>
#include <fix_fft.h>

#define AUDIOPIN 5
char im[128], data[128];

char data_avgs[14];

int i=0,val;
int NbTopsFan;
int Calc;
typedef struct{
char fantype;
unsigned int fandiv;
}fanspec;
fanspec fanspace[3]={{0,1},{1,2},{2,8}};

char fan = 1;
void rpm ()
{
NbTopsFan++;
}

int hallsensor = 2;
void setup() {
pinMode(hallsensor, INPUT);
Serial.begin(9600);
attachInterrupt(0, rpm, RISING);
LedSign::Init(); //Initilizes the LoL Shield
}
void loop() {
NbTopsFan = 0;
sei();
delay (1000); //Wait 1 second
cli();
Calc = ((NbTopsFan * 60)/fanspace[fan].fandiv);
Serial.print (Calc, DEC); //Prints the number calculated above
Serial.print (” rpm\r\n”); //Prints ” rp

for (i=0; i < 128; i++){
val = analogRead(AUDIOPIN);
data[i] = val;
im[i] = 0;
};

fix_fft(data,im,7,0);

for (i=0; i< 64;i++){
data[i] = sqrt(data[i] * data[i] + im[i] * im[i]);
};
// average bars together
for (i=0; i<14; i++) {
data_avgs[i] = data[i*4] + data[i*4 + 1] + data[i*4 + 2] + data[i*4 + 3]; // average together
data_avgs[i] = map(data_avgs[i], 0, 30, 0, 9);
}

 

// set LoLShield

for (int x=0; x < 14; x++) {
for (int y=0; y < 9; y++) {
if (y < data_avgs[13-x]) {
LedSign::Set(x,y,1);
} else {
LedSign::Set(x,y,0);
}
}
}

}

I think this was it (audio)

video

 

 

#include <pitches.h>

#define melodyPin 11
//Mario main theme melody
int melody[] = {
NOTE_E7, NOTE_E7, 0, NOTE_E7,
0, NOTE_C7, NOTE_E7, 0,
NOTE_G7, 0, 0, 0,
NOTE_G6, 0, 0, 0,

NOTE_C7, 0, 0, NOTE_G6,
0, 0, NOTE_E6, 0,
0, NOTE_A6, 0, NOTE_B6,
0, NOTE_AS6, NOTE_A6, 0,

NOTE_G6, NOTE_E7, NOTE_G7,
NOTE_A7, 0, NOTE_F7, NOTE_G7,
0, NOTE_E7, 0,NOTE_C7,
NOTE_D7, NOTE_B6, 0, 0,

NOTE_C7, 0, 0, NOTE_G6,
0, 0, NOTE_E6, 0,
0, NOTE_A6, 0, NOTE_B6,
0, NOTE_AS6, NOTE_A6, 0,

NOTE_G6, NOTE_E7, NOTE_G7,
NOTE_A7, 0, NOTE_F7, NOTE_G7,
0, NOTE_E7, 0,NOTE_C7,
NOTE_D7, NOTE_B6, 0, 0
};
//Mario main them tempo
int tempo[] = {
12, 12, 12, 12,
12, 12, 12, 12,
12, 12, 12, 12,
12, 12, 12, 12,

12, 12, 12, 12,
12, 12, 12, 12,
12, 12, 12, 12,
12, 12, 12, 12,

9, 9, 9,
12, 12, 12, 12,
12, 12, 12, 12,
12, 12, 12, 12,

12, 12, 12, 12,
12, 12, 12, 12,
12, 12, 12, 12,
12, 12, 12, 12,

9, 9, 9,
12, 12, 12, 12,
12, 12, 12, 12,
12, 12, 12, 12,
};

//
//Underworld melody
int underworld_melody[] = {
NOTE_C4, NOTE_C5, NOTE_A3, NOTE_A4,
NOTE_AS3, NOTE_AS4, 0,
0,
NOTE_C4, NOTE_C5, NOTE_A3, NOTE_A4,
NOTE_AS3, NOTE_AS4, 0,
0,
NOTE_F3, NOTE_F4, NOTE_D3, NOTE_D4,
NOTE_DS3, NOTE_DS4, 0,
0,
NOTE_F3, NOTE_F4, NOTE_D3, NOTE_D4,
NOTE_DS3, NOTE_DS4, 0,
0, NOTE_DS4, NOTE_CS4, NOTE_D4,
NOTE_CS4, NOTE_DS4,
NOTE_DS4, NOTE_GS3,
NOTE_G3, NOTE_CS4,
NOTE_C4, NOTE_FS4,NOTE_F4, NOTE_E3, NOTE_AS4, NOTE_A4,
NOTE_GS4, NOTE_DS4, NOTE_B3,
NOTE_AS3, NOTE_A3, NOTE_GS3,
0, 0, 0
};
//Underwolrd tempo
int underworld_tempo[] = {
12, 12, 12, 12,
12, 12, 6,
3,
12, 12, 12, 12,
12, 12, 6,
3,
12, 12, 12, 12,
12, 12, 6,
3,
12, 12, 12, 12,
12, 12, 6,
6, 18, 18, 18,
6, 6,
6, 6,
6, 6,
18, 18, 18,18, 18, 18,
10, 10, 10,
10, 10, 10,
3, 3, 3
};

void setup(void)
{
pinMode(11, OUTPUT);//buzzer
pinMode(13, OUTPUT);//led indicator when singing a note

}
void loop()
{
//sing the tunes
sing(1);
sing(1);
sing(2);
}
int song = 0;

void sing(int s){
// iterate over the notes of the melody:
song = s;
if(song==2){
Serial.println(” ‘Underworld Theme'”);
int size = sizeof(underworld_melody) / sizeof(int);
for (int thisNote = 0; thisNote < size; thisNote++) {

// to calculate the note duration, take one second
// divided by the note type.
//e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
int noteDuration = 1000/underworld_tempo[thisNote];

buzz(melodyPin, underworld_melody[thisNote],noteDuration);

// to distinguish the notes, set a minimum time between them.
// the note’s duration + 30% seems to work well:
int pauseBetweenNotes = noteDuration * 1.30;
delay(pauseBetweenNotes);

// stop the tone playing:
buzz(melodyPin, 0,noteDuration);

}

}else{

Serial.println(” ‘Mario Theme'”);
int size = sizeof(melody) / sizeof(int);
for (int thisNote = 0; thisNote < size; thisNote++) {

// to calculate the note duration, take one second
// divided by the note type.
//e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
int noteDuration = 1000/tempo[thisNote];

buzz(melodyPin, melody[thisNote],noteDuration);

// to distinguish the notes, set a minimum time between them.
// the note’s duration + 30% seems to work well:
int pauseBetweenNotes = noteDuration * 1.30;
delay(pauseBetweenNotes);

// stop the tone playing:
buzz(melodyPin, 0,noteDuration);

}
}
}

void buzz(int targetPin, long frequency, long length) {
digitalWrite(13,HIGH);
long delayValue = 1000000/frequency/2; // calculate the delay value between transitions
//// 1 second’s worth of microseconds, divided by the frequency, then split in half since
//// there are two phases to each cycle
long numCycles = frequency * length/ 1000; // calculate the number of cycles for proper timing
//// multiply frequency, which is really cycles per second, by the number of seconds to
//// get the total number of cycles to produce
for (long i=0; i < numCycles; i++){ // for the calculated length of time…
digitalWrite(targetPin,HIGH); // write the buzzer pin high to push out the diaphram
delayMicroseconds(delayValue); // wait for the calculated delay value
digitalWrite(targetPin,LOW); // write the buzzer pin low to pull back the diaphram
delayMicroseconds(delayValue); // wait again or the calculated delay value
}
digitalWrite(13,LOW);

}

My Time At The Summit

So, I had a lovely time will at MIT going to that there conference. It was actually pretty cool. We got to listen to a bunch of people who were either working on their own projects, talking about how to go about making your projects truly open source, or just talking about what it is like to be in a certain profession. That bit was only in the talks though. Outside the auditorium there were people who were displaying their own projects and explaining to the rest of us what they were, how they worked, and what the reasoning was behind them. An interesting project that caught my eye was a robotic snake. It was basically a waterproof robotic snake meant for lakes with a wee camera fixed to it. The movement mimicked a real snake and the purpose, I believe, was to scan lakes and observe the wild life.

In the auditorium I remember one of the talks being a woman talking about what it was like to be female in the game programming industry. A lot of her talk surrounded how women were depicted in ads, how girls do make up a large portion of gamers, and how men did not believe she was capable of making games, or at least explaining the ones she had made.

There is more to this story and I will update it. I will also add some pictures soon as well.

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

SAMSUNG

Some Projects I like

1. The Ouya

https://www.ouya.tv

An open source gaming console. It has yet to be released, but it has reached the funding it needs.

2. Space Glasses

https://www.spaceglasses.com

Glasses that were made to emulate the Iron Man computer. They call them augmented reality glasses.

 

 

3. Peregrine Gloves

http://theperegrine.com

Hot key gloves made primarily for computer games to help promote more professional gaming.

About Me

Hello, My name is Alex.

I graduated Emerson College in 2012 with my BFA in Writing, Literature, and Publishing. I’m from California and therefore am prone to do things like bum out in the sun, say dude a lot, and drink soda like it’s water. My favorite activities include snowboarding, movies, and drinking pina coladas. Not in the rain though. That stuff is wet and unpleasant and I will not have it watering down my lovely alcoholic beverages.

I’m interested in physical computing mostly because I’m tired of staring at my TV and asking myself, “How does this work? Is this black magic? Do I need to burn someone at the stake to keep my mortal soul intact?” (true story.) But I am also interested in console design and for that I kind of need to know how to build them and what to build them with.

I’m not really sure what else to put in here. I’m a bit out of it most of the time, I zone out almost constantly, and energy drinks have become a substitute for real food to me. I’m sure all of this is more than any of you wanted to know about me, so I’m going to stop here.