HTML Clock for WinCE Netbook

Before I built my Nixie Clock, for the better part of a year I used this as my working bedside alarm clock:

That is a Windows CE Netbook computer which I bought for USD$30 in early 2013 when they were being surplused. At the time it seemed like a great deal, as this was a lot of hardware for thirty bucks. Seven inch color display, full keyboard, trackpad, ethernet, wifi, USB for memory sticks and common HID devices at least, several hours rechargeable battery power, and speakers. I bought four of them so I could play around, and ended up using three of them as clocks for awhile.

The Good: Turning it into a Clock

An immediate problem was that I didn't have any programming tools for Windows CE and it wasn't a specialty I was really interested in investing in. After a lot of shuffling around I was able to score a copy of a 100 megabyte plus repository of WinCE apps, but most of them were formatted for portrait mode phone displays, and I quickly figured out WinCE apps don't believe in resizing.

But the little computers did come with a programming language -- Javascript, lurking in the built-in IE6 web browser! The large seven-segment clock display shown above is generated by flipping the background color of elements in a hand-coded HTML table. Unlike those pesky CE apps, this does resize thanks to the HTML table element width and height tags. The alarm time and whether it's armed are stored in cookies. The display turns red (which also isn't as bright in a dark room) when the alarm is armed. It plays a sound file through the netbook's speakers to sound the alarm, and basically the entire keyboard is a disarm pad when it's armed and snooze button when it's sounding off. It's pretty cool, and here it is for your amusement:

HTML Javascript Clock (ZIP Archive)

If you just click on the left link the clock will run in your browser. While it's coded for the ancient version of IE6 locked into the Sylvania's OS image, the basic display should work in any browser. The zip version will download so you can examine the code or put it on another device.

I was able to set the Sylvania up to come on automatically at power up, and unlike some CE devices it did have a malleable file system so I could add the clock, write and read cookies, and even put a shortcut in the startup folder to start it on bootup just like a "real" Windows box.

The Bad

When the browser starts, it has visible address and status bars at the top and bottom of the screen. Making those disappear requires putting IE in "kiosk" mode by pressing CTRL-T. There is supposedly a command line switch to automatically put it in kiosk mode, but the one I found documented didn't work. So every time the clock rebooted, it would start, but I'd have to find CTRL-T to get rid of the cruft and shoo the mouse cursor off the screen with the trackpad.

I had fully intended for this clock to set itself. Before buying the CE netbooks I'd been looking at "atomic" clocks that have WWV-B radio receivers. Since the netbook had wifi and could browse the web, I expected it to be able to sync its time with an internet time server via NTP. This is a feature documented to be available with WinCE.

Unfortunately, despite hours jiggering the registry, I never could get it to work and eventually concluded that NTP had been omitted when Sylvania compiled the OS image. There is no way to fix this, as WinCE images have to be built with a tool that requires you to have all the source modules to build it up; there's no way to just run a device driver or service from an executable file. Schemes to use Javascript to scrape a public site like were unworkable because of cross-site scripting security. I could have run my own time server from a machine that did do NTP, but I don't leave my other computers on when I'm not using them. Fortunately, the OS had been updated with the new Daylight Saving Time rules, so I at least wouldn't have to reset it four times a year like the one it replaced that had the old rules hard-wired.

I also thought, since it had wifi, that I should be able to add a hotkey to pop up the weather radar. I was readily able to add a hot key to pop up a website, but all of the websites I was able to find were either bloated or formatted for portrait-mode phone displays. The best I was able to find was one of's mobile sites, but it still required hitting page down after loading to see the actual map.

The Ugly

The CE build didn't have separate power profiles for mains power and battery. I could set it up to run all the time without going to sleep, but if I did that it would run all the time if the power failed, too. On the one hand it was nicer than other clocks because you could still read the display when the power was out. But on the other hand, if the power stayed out for more than a few hours it would totally die and not recover.

I eventually gave up on the weather map not because I had to find page down in the dark after finding the hotkey, but because it would drop the wifi connection at random and refuse to reconnect unless it was power cycled.


It turned out in the end that I got what I paid for.

I was surprised to find after six months or so that the displays burn, and units that have been used as clocks 24/7 get the 7-segment pattern superimposed on everything. This was a bit of a surprise because, hey, LCD's, right?

Not long after that one of the batteries failed, its wrapper inflating with gas to the point of popping off the battery cover and the unit failing immediately on the removal of mains power. That has since happened to two more of the four I bought.

One unit failed somehow so that most functions still work, but IE won't run. I have reflashed the OS from the image which was available for awhile online, but it made no difference. I suspect a bad flash or RAM chip but being CE, I have no way to run diagnostic tools.

One unit's trackpad became unusable, sending the cursor on a crazy random walk.

Just a few days ago, the AC adapter powering the one unit that still works failed, draining its battery. I'd had so much trouble with the netbooks it took me awhile to figure out the adapter was the problem. Fortunately I had three spares.

Since I built the Nixie clock I have the surviving CE netbook in my den, where the ability to read its huge (for a clock) screen from 20 feet away is a much more useful feature and it isn't a problem on those random mornings when I wake up to find it dead and in need of rebooting.

--Roger "localroger" Williams, February 2015

Email Me

Back to