Audio, Arduino, and Electronics in General

I threw together a program to control an arduino with IR LED with a computer. You can download the zip file with the control program (open the folder of your operating system) and, of course, the arduino code. Below is the processing sketch (and linked file):

// Use this method to add additional statements
// to customise the GUI controls
void customGUI(){

}

void portUp(){
ardPort += 1;
}

void portDown(){
ardPort -= 1;
}

And the linked file (named ‘gui’):
/* =========================================================
* ==== WARNING ===
* =========================================================
* The code in this tab has been generated from the GUI form
* designer and care should be taken when editing this file.
* Only add/edit code inside the event handlers i.e. only
* use lines between the matching comment tags. e.g.

After recently reading the Clone a Remote with Arduino instructable by randofo, I was inspired to try to clone the remote of my Bose Wave Radio II. While this radio is outstanding from an acoustic perspective, the fact that it’s only means of control are by remote (only one remote is included) makes this single point of failure design far from ideal.

My goal was to essentially create a “backup” version of the included remote with only the basic functions necessary to operate the radio in the event that something should happen to the remote itself (lost, broken, dead battery, etc.).

I started with the Raw IR Decoder sketch on randofo’s ‘able, loading it onto my Duemilanove. Then I hooked up the IR transmitter and pushbutton to my Uno. From there it was mostly trial and error to find the minor differences between the actual remote’s timing and my clone’s timing. Once I had the numbers, I just transposed them all into randofo’s framework for sending IR commands.

This sketch is just the barebones commands, implement control as you wish (build yourself a second remote with a button for each function, send serial commands to the arduino, etc.). Commands are easily accessed, simple function calls.

Just a little side project I worked on to create a better version of the basic radioshack motion alarm. Arduino based (hackduino specifically), expandable, and a good project to start playing with Arduino and electronics.

// warmup time
digitalWrite(ledPin, HIGH);
for (int i = 0; i = 180000){ // if the counter reaches 180 seconds
digitalWrite(alarmPin, LOW); // turn the alarm off
while(digitalRead(pirPin) == HIGH){ // while the motion continues
digitalWrite(ledPin, HIGH); // turn on the led until motion stops
}
digitalWrite(ledPin, LOW); // then turn the led off
counter = 0; // set the counter back to 0
}
else{ // otherwise (counter is less than),
if(digitalRead(pirPin) == LOW){ // check to see if there is motion
delay(2000); // and wait 2 seconds to ensure none
if(digitalRead(pirPin) == LOW){ // If there is still no motion
counter = 0; // reset counter
delay(40000); // and leave alarm on for 40 seconds
digitalWrite(alarmPin, LOW); // then turn the alarm off
}
else{ // and if there happens to be motion
goto label; // goto label (skip unneeded HIGH check)
}
}
}
}