A smart pillow that automatically plays white noise – rainy sound to soothe you and help you get a better sleep. The pillow works automatically when the room is dark and your head is laid on the pillow. Photoresistor acts light sensor to detect lighting condition in your bedroom while the pressure sensor is put together by using velostat mat in between 2 sheets of conductive fabric. The rain sound is a mp3 file installed in a micro sd card inside DFplayer which is connected to 8 ohm mini speaker.
Serial.println();
Serial.println(F("DFRobot DFPlayer Mini Demo"));
Serial.println(F("Initializing DFPlayer ... (May take 3~5 seconds)"));
if (!myDFPlayer.begin(mySoftwareSerial)) { //Use softwareSerial to communicate with mp3.
Serial.println(F("Unable to begin:"));
Serial.println(F("1.Please recheck the connection!"));
Serial.println(F("2.Please insert the SD card!"));
while (true);
}
Serial.println(F("DFPlayer Mini online."));
myDFPlayer.volume(20); //Set volume value. From 0 to 30
// myDFPlayer.play(1); //Play the first mp3
}
void loop()
{
static unsigned long timer = millis();
if (myDFPlayer.available()) {
printDetail(myDFPlayer.readType(), myDFPlayer.read()); //Print the detail message from DFPlayer to handle different errors and states.
}
}
5 in 5 : a creative process of creating a new single project in every single day in a period of 5 days – at the end of this process, there should be a total of 5 new projects.
I am recently moving into a new apartment. There were a lot of furniture and household items/supplies shopping in the past week. I’ve been carrying many heavy shopping bags that I got these kinds of bruises all over my arms. I feel like this would be something to remind me of my experience of moving in and settling my life in New York. So my day three project is in tribute to my bruised arms and my New York very first apartment.
For this project, I used Force sensor from my Arduino kit as an input. The stronger force you pressed the sensor, the worse the bruises appear on the screen. I used Firmata library to connect my Arduino board with my processing sketch.