This project was created using the LOL Shield by Jimmie Rodgers and the IR library by Ken Shirriff. The LOL library and the IR library do not work together because the ISR code in both is using the same timer. I tried combining both libraries and make one of the ISR a separate function and injected into the other, however; it failed, so I had to alter the example code of the LOL Shield without the library and the help of my friend Shawn Lauriat. The idea the came to fruition, using the mac remote I was able to move a dot around the screen. Then if you found the right dot an animation would appear that I coded in with the help of Jimmie Rodgers’s excel sheet. Then the play button would flash all the LEDs at once and the menu button would reset your dot position. Its aesthetic is like a cute TV or a Bomb!
// Searching for the Right Channel
// By Aisen Caro Chacin
// With the help of Shawn Lauriat, the LOL shield and IR library developers
#include //This is in the Arduino library
#include // IR remote control library
const int irReceivePin = 14; // pin connected to IR detector output
IRrecv irrecv(irReceivePin); // create the IR library
decode_results results; // IR data goes here
int blinkdelay = 75; //This basically controls brightness. Lower is dimmer
int runspeed = 20; //smaller = faster
int pin13 =13;
int pin12 =12;
int pin11 =11;
int pin10 =10;
int pin09 =9;
int pin08 =8;
int pin07 =7;
int pin06 =6;
int pin05 =5;
int pin04 =4;
int pin03 =3;
int pin02 =2;
int x=1;
int y=0;
const int pins[] = {
pin13,pin12,pin11,pin10,pin09,pin08,pin07,pin06,pin05,pin04,pin03,pin02};
void loop() {
byte line = 0;
unsigned long data;
if (irrecv.decode(&results)) {
// here if data is received
irrecv.resume();
if(results.value == 2011255018){
up();
}else if(results.value == 2011246826){
down();
}else if(results.value == 2011259114){
right();
}else if(results.value == 2011271402){
left();
}else if(results.value == 2011283690){
menu();
}else if(results.value == 2011275498){
play();
}
}
if (x == 2048 && y == 5) {
DisplayBitMap();
y = 0;
}
for(line = 0; line < 9; line++){
if(line == y){
grid[line]= x;
}else{
grid[line]= 0;
}
}
for(int i = 0; i < runspeed; i++) {
for(line = 0; line < 9; line++) {
data= grid[line];
for (byte led=0; led<14; ++led) {
if (data & (1<<led)) {
turnon((line*14)+led);
delayMicroseconds(blinkdelay);
alloff();
}
else {
delayMicroseconds(blinkdelay);
}
}
}
}
}
void blinkall(int numblink) {
alloff();
for(int n = 0;n < numblink;n++) {
if (irrecv.decode(&results)) { // need to call the IR read
// here if data is received
irrecv.resume();
if(results.value == 2011283690){ // this makes the menu button reset if it is stuck on the play loop
return;
}
}
for(int i = 0; i < runspeed; i++) {
for(int j = 0; j < 126; j++) {
turnon(j);
delayMicroseconds(blinkdelay);
alloff();
}
}
delay(500);
}
}
void sequenceon() {
for(int i = 0; i < 126; i++) {
turnon(i);
delay(800);
alloff();
delay(800);
}
}
void DisplayBitMap()
{
boolean run=true;
byte frame = 0;
byte line = 0;
unsigned long data;
while(run == true) {
for(int i = 0; i < runspeed; i++) {
for(line = 0; line < 9; line++) {
data = pgm_read_word_near (&BitMap[frame][line]); // fetch data from program memory
if (data==18000){
run=false;
}
else for (byte led=0; led<14; ++led) {
if (data & (1<<led)) {
turnon((line*14)+led);
delayMicroseconds(blinkdelay);
alloff();
}
else {
delayMicroseconds(blinkdelay);
}
}
The concept behind this pumpkin was inspired by the Toccata in Fugue D Minor by Bach. The teeth of the pumpkin are white keys/ switches, that when pressed to the bottom surface close the circuit and play a note through a piezo buzzer. If the first and the last key are both pressed at the same time, a short introduction of the Toccata in Fugue plays. The light of the pumpkin turns on at night, once a photoresistor reads values that are low enough to mean darkness. A little stuffed dead guy accompanies Toccata CalaBach, representing Johann Sebastian.
// CODE:
int photo= 0; int led = 2; int key1 = 3; int key2 = 4; int key3 = 5; int key4 = 6; int key5 = 7; int key6 = 8; int speakerOut = 9;
int debounce = 10;
int state= LOW; int lastkeyvalue = LOW; // we start, assuming no motion detected int val= 0; int val1 = 0; int val2 = 0; int val3 = 0; int val4 = 0; int val5 = 0; int val6 = 0; // variable for reading the key status //****************************************************************************** // TONES ========================================== // Start by defining the relationship between // note, period, & frequency. int c= 3830; // 261 Hz int d= 3400; // 294 Hz int e= 3038; // 329 Hz int f= 2864; // 349 Hz int g= 2550; // 392 Hz int a= 2272; // 440 Hz int b= 2028; // 493 Hz int C= 1912; // 523 Hz // Define a special note, ‘R’, to represent a rest int O= 0;
// MELODY and TIMING ======================================= // melody[] is an array of notes, accompanied by beats[], // which sets each note’s relative length (higher #, longer note) int melody[] = { a, g, a, O, g, f, e, d, 3615, d }; int beats[] = { 8, 8, 64, 64, 16, 16, 16, 16, 64, 64 }; int MAX_COUNT = sizeof(melody) / 2; // Melody length, for looping.
// Set overall tempo long tempo = 10000; // Set length of pause between notes int pause = 1000; // Loop variable to increase Rest length int rest_count = 100; //<-BLETCHEROUS HACK; See NOTES
// Initialize core variables int tone_ = 0; int beat = 0; long duration = 0; //******************************************************************************
if (val<400){ digitalWrite(led, HIGH); }else{ digitalWrite(led, LOW); }
}
void playSong() { // Set up a counter to pull from melody[] and beats[] for (int i=0; i 0) { // if this isn’t a Rest beat, while the tone has // played less long than ‘duration’, pulse speaker HIGH and LOW while (elapsed_time < duration) {
// DOWN digitalWrite(speakerOut, LOW); delayMicroseconds(tone_ / 2);
// Keep track of how long we pulsed elapsed_time += (tone_); } } else { // Rest beat; loop times delay for (int j = 0; j < rest_count; j++) { // See NOTE on rest_count delayMicroseconds(duration); } } }
Toccata Calabaza is an interactive pumpkin design that has different functions based on three inputs. A motion sensor, when triggered plays the Toccata and Fugue in D minor. When the night falls a photoresistor triggers the light inside the pumpkin. A temperature sensor is set to change the lights to flickering orange when it gets colder outside.
Some of the challenges I found in making this pumpkin is that the PIR sensor is too sensitive, so the the Toccata plays constantly. I will have to take off the lens, and perhaps the sound will be more accurate to movement. Another challenge is better representing the chill of the ghost with more than just an orange flicker. Some positive aspects of the project have been learning to compose with PWM, and having to do more research on motion sensing. I’m excited to learn more about music tones with PWM pins.
Aisen Caro Chacin is a regenerating composition of cells that collaborate to form an independent unit, despite of this precarious human condition. Together they compose a she, a Venezuelan, a Spaniard, an American, and an animal, whose patterns of migration are not based on seasons, but rather chance, chaos, and opportunity. Her curiosity drove her to a career in the Arts, a true trans-disciplinary practice that allows her to dabble between fields and still remain in a coherent path. Her intent has been to question the function and essence of art in order to explore dislocated, un-plotted, un-assigned ideas and social situations. She is also a bucket of ideas open to merge and exchange with other buckets
to create
coop erative
k
r
Why [pcomp]? E± L± E±C ±T+ R+ I±C ± I ± T ±Y !!!
Circuitry has become a fascination to me and Forrest Mims III a great influence on my latest work. Circuits and microcontrollers are the main reason why I am in MFA DT. After this class I hope to grasp on the Arduino API, and hope to program other chips in place of the prototyping boards.
I came out of Maker Faire wired with excitement, inspired to the gills, and ready to make – make – make! I felt at home, I thought I was born in just the right time to experience the fruition of this culture. The culture of the makers and the breakers, where art and science are one, where a science museum shows off the vitality that it attempts to explain. The museum oozed with imagination, everyone was happy to be there together, participating in a huge show and tell. I was inspired to culminating some ideas that have been brewing in my brain for a while, like the sound sculpture albums, and the rain room, and the photo-sound performance wall. In a way I wished I had my own project there, but I am glad I had free reign to explore and find all the knickkancks, experiments, and projects. I loved so much of it, it was hard to pick just 3 to talk about. So to do the rest of the projects justice, I will post pictures of the rest.
The most amazing, beautiful, poetic piece in Maker Faire NY 2011. This swing set had a curtain of rain that would switch off as the swing would pass directly under the curtain. This work reminds me of a piece I’ve been wanting to make for a while now, a rain room that partitions the rain as you walk through. As far as interfaces, this is the most successful blissful work. Though I dared not to try it, since I saw a few girls get wet. I think the switches were not always working properly. Regardless of the switches, if it wasn’t for the cold or the line, I would have loved to swing by.
This piece created by Luis Violante is also endearing to me, since I have an utter fascination with microscopes. I’ve had one since I was a kid. In the Imagine Scope, Violante used a mini projector to play movies through the microscope viewfinders. The slides each had a magnetic chip that one could scan by placing it under the lens. Then depending on the slide you picked a movie would play. This interface is successful in many ways. Conceptually, it is taking the situation of watching films and redirecting it to a different point of view, perspective. It invites us to analyze these short films as carefully as biological specimens in a petri dish. Also I find the use of the mini projector a very clever way of displaying affection to the miniature world. This piece is just fantastic, the video selection was wonderful. I had the delight to see a compilation of images collected from one of the earliest space explorers.
This Austin band is so cool. They use 4 huge tesla coils to amplify their sound. I had seen a video of their performance before, and luckily got the opportunity to dee them live at maker faire. The only disappointing aspect, was that instead of having a band member in chain maille and armor conducting the band between the 2 coils, they had a metal cage. Members of the audience were invited to hang out in the electrocuted cage for the duration of a song- and honestly this was boring. It made a spectacle of a perfectly awesome band.
aisencc 5:54 am on December 6, 2011 Permalink |
// Searching for the Right Channel
// By Aisen Caro Chacin
// With the help of Shawn Lauriat, the LOL shield and IR library developers
#include //This is in the Arduino library
#include // IR remote control library
const int irReceivePin = 14; // pin connected to IR detector output
IRrecv irrecv(irReceivePin); // create the IR library
decode_results results; // IR data goes here
int blinkdelay = 75; //This basically controls brightness. Lower is dimmer
int runspeed = 20; //smaller = faster
int pin13 =13;
int pin12 =12;
int pin11 =11;
int pin10 =10;
int pin09 =9;
int pin08 =8;
int pin07 =7;
int pin06 =6;
int pin05 =5;
int pin04 =4;
int pin03 =3;
int pin02 =2;
int x=1;
int y=0;
const int pins[] = {
pin13,pin12,pin11,pin10,pin09,pin08,pin07,pin06,pin05,pin04,pin03,pin02};
const int ledMap[126][2] ={
{pin13, pin05},{pin13, pin06},{pin13, pin07},{pin13, pin08},{pin13, pin09},{pin13, pin10},{pin13, pin11},{pin13, pin12},{pin13, pin04},{pin04, pin13},{pin13, pin03},{pin03, pin13},{pin13, pin02},{pin02, pin13},
{pin12, pin05},{pin12, pin06},{pin12, pin07},{pin12, pin08},{pin12, pin09},{pin12, pin10},{pin12, pin11},{pin12, pin13},{pin12, pin04},{pin04, pin12},{pin12, pin03},{pin03, pin12},{pin12, pin02},{pin02, pin12},
{pin11, pin05},{pin11, pin06},{pin11, pin07},{pin11, pin08},{pin11, pin09},{pin11, pin10},{pin11, pin12},{pin11, pin13},{pin11, pin04},{pin04, pin11},{pin11, pin03},{pin03, pin11},{pin11, pin02},{pin02, pin11},
{pin10, pin05},{pin10, pin06},{pin10, pin07},{pin10, pin08},{pin10, pin09},{pin10, pin11},{pin10, pin12},{pin10, pin13},{pin10, pin04},{pin04, pin10},{pin10, pin03},{pin03, pin10},{pin10, pin02},{pin02, pin10},
{pin09, pin05},{pin09, pin06},{pin09, pin07},{pin09, pin08},{pin09, pin10},{pin09, pin11},{pin09, pin12},{pin09, pin13},{pin09, pin04},{pin04, pin09},{pin09, pin03},{pin03, pin09},{pin09, pin02},{pin02, pin09},
{pin08, pin05},{pin08, pin06},{pin08, pin07},{pin08, pin09},{pin08, pin10},{pin08, pin11},{pin08, pin12},{pin08, pin13},{pin08, pin04},{pin04, pin08},{pin08, pin03},{pin03, pin08},{pin08, pin02},{pin02, pin08},
{pin07, pin05},{pin07, pin06},{pin07, pin08},{pin07, pin09},{pin07, pin10},{pin07, pin11},{pin07, pin12},{pin07, pin13},{pin07, pin04},{pin04, pin07},{pin07, pin03},{pin03, pin07},{pin07, pin02},{pin02, pin07},
{pin06, pin05},{pin06, pin07},{pin06, pin08},{pin06, pin09},{pin06, pin10},{pin06, pin11},{pin06, pin12},{pin06, pin13},{pin06, pin04},{pin04, pin06},{pin06, pin03},{pin03, pin06},{pin06, pin02},{pin02, pin06},
{pin05, pin06},{pin05, pin07},{pin05, pin08},{pin05, pin09},{pin05, pin10},{pin05, pin11},{pin05, pin12},{pin05, pin13},{pin05, pin04},{pin04, pin05},{pin05, pin03},{pin03, pin05},{pin05, pin02},{pin02, pin05}
};
uint16_t BitMap[][9] PROGMEM = {
{0,0,0,0,2048,5120,2048,0,0},
{0,0,0,10752,2048,13824,2048,10752,0},
{0,13696,8320,2560,13696,2560,8320,13696,0},
{4352,9344,2624,4352,9344,2560,9408,12672,6912},
{4352,9344,2624,4352,8320,15232,8384,12672,6912 },
{1024,1536,1280,1152,1088,16352,4224,3840,0},
{1024,1536,17921920,1024,16320,4224,3860,16383},
{1024,1536,1792,1920,1024,16320,4224,3882,16383},
{512,768,896,960,512,8160,2112,6037,16383},
{256,384,448,480,256,4080,1056,5098,16383},
{128,192,224,240,128,2040,528,4586,16383},
{64,96,112,120,64,1020,8456,13562,16383},
{32,48,56,60,32,8702,12420,14457,16383},
{32,48,56,60,8224,12798,14468,15482,16383},
{16,24,8220,30,12304,14591,15426,15934,16383},
{8,8204,12302,8207,8200,15487,15905,16286,16383},
{4,1229,14343,8199,8196,12351,15888,16271,16383},
{2,6147,15363,12291,12290,14367,16136,16327,16383},
{1,7169,15873,14849,14337,15375,15876,16355,16383},
{0,7680,16128,14592,14336,14343,15362,16129,16383},
{16128,16256,16320,14528,12352,12291,12289,14336,16383},
{7680,16256,16320,16352,15456,14369,14336,14336,16383},
{1920,8128,16352,16352,15920,15520,15456,15872,16383},
{0,1984,4064,7952,15952,16016,15968,16128,16383},
{0,448,2016,4080,7952,16208,16160,16256,16383},
{0,0,960,2016,3984,7984,16256,16376,16383},
{0,0,0,960,1824,4000,8128,16380,16383},
{0,0,0,384,960,2016,4088,16382,16383},
{0,0,0,192,480,1008,2040,16383,16383},
{0,0,0,0,192,480,1008,2040,16383},
{0,0,0,192,0,192,480,1008,2040},
{0,0,192,0,0,192,480,1008,2040},
{0,288,0,192,0,192,480,1008,2040},
{0,816,192,0,0,192,480,1008,2040},
{0,816,1032,192,0,192,480,1008,2040},
{0,816,1032,192,0,192,480,1008,2040},
{0,528,1224,1032,0,192,480,1008,2040},
{0,560,1032,1032,528,192,480,1008,2040},
{0,560,1224,1032,528,480,480,1008,2040},
{0,560,1224,1032,528,288,480,1008,2040},
{0,560,1224,1032,528,288,192,1008,2040},
{0,560,2040,1752,528,816,480,192,0},
{0,560,1224,1032,0,528,288,192,0},
{0,560,1224,1032,4092,528,288,192,0},
{0,560,2040,1752,4092,816,0,0,0},
{0,512,1920,1728,3968,768,0,0,0},
{1792,3712,4032,7872,8064,3968,1792,0,8},
{0,1536,1984,1664,3968,768,0,8,28},
{0,1536,3968,3840,7424,1536,8,28,28},
{0,1536,3968,3840,7424,1544,28,28,28},
{0,1536,3968,3840,7448,1564,28,28,62},
{0,1536,3968,3848,7452,1564,28,62,127},
{0,1536,3976,3868,7452,1564,62,127,93},
{0,1544,3996,3868,7452,1598,127,93,8},
{0,1032,3612,3612,1052,62,127,93,8},
{4096,14336,4192,192,2018,4095,2034,192,96},
{4096,14336,4288,384,4066,8183,4066,384,192},
{10240,4096,11264,6144,15873,16251,15889,6144,3072},
{4096,14336,6144,12288,15364,16094,15364,12288,6144},
{10240,4096,14336,8192,14340,16094,14340,8192,12288},
{0,4096,8192,0,12292,15070,12292,0,8192},
{4096,14336,4096,0,8196,14046,8196,0,0},
{4096,14336,4096,0,66,11759,66,0,0},
{0,0,0,0,0,11759,0,0,0},
{18000}
};
// BitMap[9]
uint16_t grid[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0
};
void up(){
Serial.println(“moveUP();”);
if(y > 0){
y= y -1;
}
}
void down(){
Serial.println(“moveDOWN();”);
if(y < 8){
y= y +1;
}
}
void right(){
Serial.println("moveRIGHT();");
if(x 1) {
x /= 2;
}
}
void menu(){
Serial.println(“menu();”);
x=1;
y= 0;
}
void play(){
Serial.println(“play();”);
blinkall(33);
}
void setup() {
blinkall(2); // useful for testing
Serial.begin(9600);
pinMode(irReceivePin, INPUT);
irrecv.enableIRIn(); // Start the IR receiver
Serial.println(“Press a remote key”);
}
void turnon(int led) {
int pospin = ledMap[led][0];
int negpin = ledMap[led][1];
pinMode (pospin, OUTPUT);
pinMode (negpin, OUTPUT);
digitalWrite (pospin, HIGH);
digitalWrite (negpin, LOW);
}
void alloff() {
DDRD = B00000010;
DDRB = B00000000;
}
void loop() {
byte line = 0;
unsigned long data;
if (irrecv.decode(&results)) {
// here if data is received
irrecv.resume();
if(results.value == 2011255018){
up();
}else if(results.value == 2011246826){
down();
}else if(results.value == 2011259114){
right();
}else if(results.value == 2011271402){
left();
}else if(results.value == 2011283690){
menu();
}else if(results.value == 2011275498){
play();
}
}
if (x == 2048 && y == 5) {
DisplayBitMap();
y = 0;
}
for(line = 0; line < 9; line++){
if(line == y){
grid[line]= x;
}else{
grid[line]= 0;
}
}
for(int i = 0; i < runspeed; i++) {
for(line = 0; line < 9; line++) {
data= grid[line];
for (byte led=0; led<14; ++led) {
if (data & (1<<led)) {
turnon((line*14)+led);
delayMicroseconds(blinkdelay);
alloff();
}
else {
delayMicroseconds(blinkdelay);
}
}
}
}
}
void blinkall(int numblink) {
alloff();
for(int n = 0;n < numblink;n++) {
if (irrecv.decode(&results)) { // need to call the IR read
// here if data is received
irrecv.resume();
if(results.value == 2011283690){ // this makes the menu button reset if it is stuck on the play loop
return;
}
}
for(int i = 0; i < runspeed; i++) {
for(int j = 0; j < 126; j++) {
turnon(j);
delayMicroseconds(blinkdelay);
alloff();
}
}
delay(500);
}
}
void sequenceon() {
for(int i = 0; i < 126; i++) {
turnon(i);
delay(800);
alloff();
delay(800);
}
}
void DisplayBitMap()
{
boolean run=true;
byte frame = 0;
byte line = 0;
unsigned long data;
while(run == true) {
for(int i = 0; i < runspeed; i++) {
for(line = 0; line < 9; line++) {
data = pgm_read_word_near (&BitMap[frame][line]); // fetch data from program memory
if (data==18000){
run=false;
}
else for (byte led=0; led<14; ++led) {
if (data & (1<<led)) {
turnon((line*14)+led);
delayMicroseconds(blinkdelay);
alloff();
}
else {
delayMicroseconds(blinkdelay);
}
}
}
} frame++;
}
}