Scripting a PC CD-tray to rock the baby to sleep

This enterprising Linux user wrote a script that rhythmically opens and closes the CD tray on a tower PC; the CD tray is connected to the baby's rocking seat. As the tray cycles, the baby rocks. Lovely.

Linux Baby Rocker (via Neatorama)


  1. I don’t like how when the tray closes it stops the rocking. I’d just use an oscillating fan. No scripting required.

  2. cool they found a way to break the motor in the CD drive in record time. Those things are designed for the wight of, well a CD and pretty much that’s all. I’m amazed it works at all.

  3. While it’s a nice novel use of the CD-tray, I wouldn’t put my own baby into a car seat for sleeping. it is designed for safety in the car but not recommended for longer periods. also a recent study showed that they get less oxygen that way. a cradle is definitely better.
    there are some situations when we’re very exhausted (as new parents), so i know if we had that machine solution at hand instead of making it sleep close to us, we’d try to use it sometimes. therefore i prefer not to build something like this our buy a battery-automated rocking chair. anyway he prefers our arms to fall asleep!

  4. Babies are cute. This is silly and amusing.

    Mojave and other pruney scolds should start a campaign to ban motorized baby swings rather than leave pissy comments on boingboing.

  5. I always new cd drives had to be good for something even in the age of 500gb external pocket sized hard drives.

  6. @ Mojave- You’re wrong.

    My son didn’t have colic but for the first 9 months or so of his life he cried almost all the time, especially when it was nighttime. After a lot of trial and error I found that the only thing that would calm him was to put him in one of those infant rocker/bouncer things and gently bounce it. As soon as you stopped he would wake up and start crying again. I actually trained myself to sleep in my bed with one foot hanging off the side, bouncing the rocker all night.

    Raising children is hard and every child is different. Finding a solution that gives a few minutes/hours of peace is not going to cause psychological damage to the child.


    Our records show that you have now posted at least two (2) articles pertaining to getting children to sleep upon your web log (“blogospore”). As a representative of THE SANDMAN, I am afraid I must ask you to cease and desist, taking down said posts, pursuant to the USDMCA. THE SANDMAN has copyrighted the creative work of “children sleeping,” and while we appreciate your efforts to spread the amazing phenomenon of “children sleeping,” we are afraid that this constitutes an infringement of THE SANDMAN’s copyright over said work.

    We appreciate your punctual response to our polite request, and, if you are interested in finding out more about THE SANDMAN, we hope you will pick up the newest book from THE SANDMAN, “Gunk In Your Eye: Stories of Sexy Somnambulists.”

    Thank you,

  8. @Mojave- I’m with Randalll on this one. If your child is colicky, you can look forward to “rocking them to sleep” for hours and hours at a stretch, usually with no sleep whatsoever. If this trick helps the baby de-stress and get a little sleep, that’s a GOOD thing.

  9. I agree with #1, I don’t like how the rocking just comes to a sharp halt when the tray closes. The irregularity of the rocking might limit this technique’s usefulness.

  10. Oh, sure, it’s cute until…

    “Application YOUR_BABY has suffered a fatal error and will be terminated. You will lose any unsaved work. [OK]”

  11. Interesting idea, but it looks like the resonant frequency of the rocking basket is 10 times higher than that of the CD drive, so it doesn’t work well.

    I had to dig up an old hard drive to use as a white noise generator to get my first child to sleep. It was a 10 MB Miniscribe in full-height 5″ form factor. A valuable collector’s item, indeed.

    But the best rocking-to-sleep thing was a sling. Kids love to be walked around. It’s comforting.

  12. Alternatively @DAY VEXX and RANDALLL, if your child is colicky you might want to include taking your child to a cranial osteopath, ideally trained further in pediatrics (not linux). I’ve never known it not to work.


  13. What a beautiful child! Every time I see a baby I want another, then my 5 yr old runs in crying after being bashed by his large little brother; sobers me up real quick!

    Nixie Bunny, you’re right, a Maya Wrap sling is one of the most important things a new parent can master.

  14. @15: This. How about:
    – USB powered massager/vibrator to vibrate the seat
    – USB mobile
    – Kludging a PC into a Diaper Genie
    – Power a rocker with an army of Flip Flap plants

  15. Baby Charlotte v1.0 release date November 27th. Better check the DRM on her, Sony might come for her.

  16. Hey, I bet if he used a stretchy cord from the CD-ROM to the rocker, the rocker would keep moving even when the CD-ROM closes.

  17. Its the knee jerk reactions to posts like these and people’s super snarky and entertaining responses to those reactions that make me glad BB now has commenting.

  18. Just going by memory and just looking at the headline, couldn’t this be done with just ‘while (true); do eject /dev/scd0; done’?

  19. @Mojave: The contrast between your tone in the thread and your tone in the Girls Gone Wild Trial thread amuses me.

  20. @Mojave, I seriously doubt that this is their only means of interaction with their child.

    It looks like it would burn out the motor in the CD drive fairly quickly.

  21. (what happened to plain funny?)

    nag nag immoral nag windows nag nag *nix rules nag carbon footprint* ?

    *) haha

  22. @13: Carbon footprint?

    That was my first thought, too. I think it would be much better to just tie the string to the dog’s tail.

  23. @36 Carbon footprint?
    That was my first thought, too. I think it would be much better to just tie the string to the dog’s tail.

    Now wait a minute! Wouldn’t the dog produce even more carbon, especially when not in use!

  24. Wow. I should have thought of that when my DD was that age about a year ago. For the person who talked about “safety” of napping in the snugride carseat, it really is safe. That’s why there’s a handle, because *kids fall asleep in them!* and you carry them into the house. Sometimes, they need just a little more rocking to get them back into napping. As a Mom and Geek, I approve of this script. Now someone please send me the python and linux version so I can have that ready if we decide to have another one! ;)

  25. Oh dear too many people taking a cute novelty programme too seriously!
    Linux truly the answer to all problems!

Comments are closed.