My goal for this project was to circuit bend a CD player to be controlled by a sensor/micro-contoller. I found the hardest thing about this was to “zero out” the CD’s built-in functions so that I had complete control over its starting and stopping. This involved coding in some measures to make sure it stopped before the CD was told to play, so that it wouldn’t pause instead. This took some time to fully figure out, and I think there is a lot of undiscovered potential for this system that I hope to implement in some upcoming pieces.
While I’m pleased to have achieved my main goal of the CD player circuit bend, I wish I had more time to develop the content (audio) to better utilize the technical developments.
int cd1stop = 2;
int cd1play = 3;
int cd1forward = 4;
int sensorPin = 0;
int val = 0; // variable to store the value coming from the sensor
void setup()
{
pinMode(cd1stop, OUTPUT);
pinMode(cd1play, OUTPUT);
pinMode(cd1forward, OUTPUT);
pinMode(sensorPin, INPUT); // }
void loop()
{
val = analogRead(sensorPin); // read the value from the sensor
delay(1000);
if (val < 850) // zero out CD player (automatically plays) and stop it
{digitalWrite(cd1play, HIGH);
delay(100);
digitalWrite(cd1stop, LOW);
delay(1000);
digitalWrite(cd1stop, HIGH);
delay(1000);
}
else // play
{digitalWrite(cd1play, LOW);
}
}


