|The alarm clock before I started writing this article|
Most alarm clocks have somewhat awkward interfaces, which may be why so many people have switched to using their mobile phones instead. Most mophos have alarm clocks that are easy to use — just open the clock app, choose a menu item and type in the time. Especially for people like me, who doesn’t get up at the same time each day, using a traditional alarm clock is annoying beyond endurance. It’s an outrage! I’ll write my congresscritter!
Anyway, where was I? Yes. An alarm clock needs a numeric input pad. But, of course, I find using a mopho to be annoying, too, since I wake up all the time and need to be able to see what time it is before continuing to sleep.
I’m easily annoyed and sleep unsoundly. There’s probably no connection between the two things.
|Alarm clock control device|
Anyway, I wrote an Emacs-based alarm clock, which, as a bonus, shows just how cold it is outside, too. If it’s too cold, I just ignore the alarm and keep on sleeping. And it displays the time using the Futura type face. How could you use an alarm clock with an inferior font?
To control the thing, I thought it’d be perfect to use a wireless keypad. It allows me to set the alarm very easily (just type 8 RET of 730 RET). However, finding a keypad that had the required range turned out to be pretty difficult. I went through five different ones before I ended up with this one, a Logitech N305. All the other ones either only had a two meter range, tops, or were totally unreliable. The N305 only has a single unusable key, the “Excel” key, so I use the rest of the keys to control the volume of the music and the lights in the bedroom.
|MiniGoose temperature sensor|
|The new alarm clock. See? Much nicer. And warmer|
Writing this it occurred to me that I had a spare tiny FitPC2 computer, and a 10″ USB-powered DisplayLink monitor that I had never used. Instead of using the (really too big) eMachines all-in-one (seen at the top there) as the alarm clock, I could perhaps use the FitPC2 instead?
And I could!
DisplayLink technology is pretty new, and there are some quirks, so in case you have a similar setup and is Googling for how to get it to work under Linux (Debian Squeeze, Linux kernel 2.6.38), the rest of this blog entry is for you.
idVendor 0x17e9 Newnham Research
iManufacturer 1 DisplayLink
iProduct 2 Monztor S10
iSerial 3 10270020
The iMo 10″ screen comes up as a cdrom device:
[ 3.408147] sr0: scsi3-mmc drive: 8x/40x writer xa/form2 cdda tray
[ 3.408372] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 3.409760] sr 2:0:0:0: Attached scsi CD-ROM sr0
So you have to use usb_modeswitch to switch it to DisplayLink mode:
usb_modeswitch -v 0x17e9 -p 0x0288 -u 1
After doing that, the screen should go green, but X won’t work on it. Say the following:
and you should now be able to start Xorg on the device.
Option “fbdev” “/dev/fb0”
See? It couldn’t be simpler.
The Mimo USB monitor is quite nice, by the way. It’s also a touch screen and a USB hub, but it’s not a floor wax. However, the contrast leaves something to be desired, and the viewing angle isn’t very good. But it’s good enough to use as an alarm clock.
7 thoughts on “Alarm Clock”
Looks nice! Emacs seems to be a good fit for home automation interfaces.
What does the screen look like when you are setting the clock?
Does it flash the name of the song the jukebox is playing when unpaused?
It doesn't give any feedback when you're typing, but after hitting RET, it displays the alarm under the time in a darker grey, like you see at the top.
And it does not show the song name or display the album cover. Most of the machines do as the screensaver, but for the bedroom I wanted to keep the brightness of the screen at a minimum. Unfortunately, the “black” of most LCD screens (including both the ones I've used here) aren't very black. So it's lighter than I'd prefer. And adding more non-black screen real estate would exacerbate the problem, unfortunately.
Typing feedback: Ah, ok.
I cut down your clock.el for my jukebox, and my remote presenter thing with a backwards and forwards button now works as power down and skip album – thanks!
(I don't have a screen on the machine, so I just made getty use emacs as the login program on tty1 to get they keystrokes.)
Screen brightness: Ah, yeah. Maybe one of those ebook-reader screens would help. But then you couldn't see it in the dark…
alarm clock very important to me especially for work this great info thanks
Regarding unsound sleep: Is that a PC in your bedroom? 🙂 For years, I always imagined that the sonorous humming of the fan(s) would /help/ me sleeping, but I finally found that silence is *much* better as one doesn't listen whether the hard drive spins up.
It's a computer, but it doesn't have any fans, spinning disks or any other moving parts. So it's kinda quiet.