Use an Old Linux Computer to Put your Baby to Sleep

baby and linuxIf you are not a geek, let me explain the logic of this very simple program.

The program will first auto-eject the CD-ROM drive of your computer and then it will close that open tray. This open-close loop will run forever unless you terminate the program manually.

while [1 = 1]
 do
	#eject cdrom
	eject

	#pull cdrom tray back in
	eject -t
 done

Now the interesting part -- using just these four lines of code, a geek turned his old Linux* computer into a baby rocker.

He attached a string between the tray of the CD-ROM drive and the baby seat and as the tray would open and close repeatedly, the smooth movements were enough to put his baby to sleep. Awesome.

[*] you are not on on Linux, you can build a similar Baby rocker program for Windows using Autohotkey software.

Find this article at: http://www.labnol.org/software/old-linux-computer-for-baby/10420/

Tags: , , , , Software

Reader Comments

May I respectfully suggest a slight change to your title:
Use an Old Linux Computer to Lull your Baby to Sleep.
It avoids any unfortunate connotations.

Thats interesting :)

What is the relevance of this post?

How My God! You are a Real Genius! Awesome!

@Manish
Its how man creatively uses his resources in different ways. In this case technology has now given you a problem to something many parents lose their sleep over.

And undoubtedly shorten the life of that drive’s motor to mere weeks.

I hope the drive does not comes apart :)

This reminds me of a colleague who used a rotating fan and a length of string to keep his mouse moving when away from his desk, thus preventing him from getting logged out of his remote windows terminal.

Simple solution, if power-hungry!

This is awesome! :)

My $0.02.

We can do this with windows system also. Use the below Vbscript.

{{{
Set oWMP = CreateObject(”WMPlayer.OCX.7″ )
Set ArrCDROM = oWMP.cdromCollection
while (1)
wscript.sleep 3000
ArrCDROM.Item(0).Eject
wscript.sleep 3000
ArrCDROM.Item(0).Eject
wend
}}}

link

Thanks,
Sitaram

You can also use an external **d-rom, with a small laptop and it will possible consume much less energy, and probably less noise (fan).

The unix code seems much simpler than the vbscript.

this is definitely not GREEN. i think you can rig a reciprocating motor which consumes far fewer watts to do it.

and……. here’s one for the mac!

#!/bin/sh
while true
do
sleep 3; drutil tray open
sleep 3; drutil tray close
done

have fun!

This is a very creative way of making the baby to sleep.

I enjoyed the fact that “Ads by Google” surrounding this post featured a Cray XT5m.



Google Custom Search