Wishful Coding

Didn't you ever wish your
computer understood you?

Philips 162 Post-Mortem

You read that right, I used my phone untill it died. This is not a review or even a preview, but a postview.

I wish there was a gadget website of which the authors are not too happy about ditching their almost-new phone. – some tweep lost in history

The upside of a post-mortem about a phone is that I used it for years, so I know all the details and annoyances. The downside is that Philips no longer makes the phone, but no matter, I wouldn’t recommend you buy it anyway.

It’s a practical phone. It lies confortably in your hand, it’s super sturdy, even after years, it lasts a week on a charge, and it even has a few games on it.

It doesn’t have a camera, wifi, bluetooth or pretty mutch anything else, but it’s great for calling and texting. The T9 feature works good, but always uses the interface language and does not allow adding words.

My number one annoyiance with the phone is that in the phonebook the screen displays only 8 of the 10 digits of a phone number in a hard to follow sliding motion.

Speaking of the phone book, I recently discovered that copying contacts to the SIM card is hard.

The menu of the phone is easy to use, but there is hardly any reason to. On a daily basis, I tend to use the directional pad to get to the most frequently used functions. This does mean it is fairly easy to do stuff accidentally if you forget to lock it.

One thing to keep in mind is that it doesn’t warn you when the inbox is full. It just doesn’t receive anymore text messages. Once in a while, when people stop replying to my messages, I need to check if it’s me or my phone.

Overall, this phone served me well. R.I.P. phone…

Pure CSS Gauge

I got nerdsniped

So I had to make this gauge using CSS animation.

I used two nested divs with round borders. The outer one does the quadrants with a top/left/bottom/right border. The inner one has only a top border, and slides over the bottom one.

Note that halfway through, the inner border changes from sliding out, to sliding in. Otherwise you’d get in trouble during the last quadrant.

A good way to see how it works is removing the negative margin, or change the inner border colour.

Incremental E-paper update

This is what I’ve been up to since last post. I almost completely rewrote the Arduino code to support different waveforms and both full updates and incremental ones.

I admit the old update looked smoother, but it faded away over time, defeating on of the main features of E-paper, that it is bi-stable.

I do think the incremental updates look cool, kind of like an evolving Pokémon.

Get the source code

I am using a modified version of shiftOut that can send any number of bits. This is needed to send 1 bit for the background and common, and 16 bits for a character.

The EIO pin is no longer used, but just tied low. This causes the first chip to be selected when it wakes up. The enable pins are chained so that when the first chip is full, it pulls the second chip low.

In short, this is how I update the screen:

Step one is to convert all 8 bit characters to 16 bit segment data using a big table.

Next, I create a struct with the changes. This struct contains 6 arrays. One with the added segments, one with the removed segments, one with all changed segments and 3 negatives.

In case this is a complete update, this struct is very easy to make. In this case the negative of the aded segments equals the deleted segments.

In the case of a partial update, this struct is generated using a lot of binary logic, based on an array of the current segments.

Now that we have a struct of all the changes, we actually need to write this to the shift register and toggle the latch to send it to the display. The writing itself is fairly trivial, but the waveform is not.

I will cover the simple waveform in this post, and leave the 757 for you to figure out. The principle is the same.

First we wakeup the display. After every update, we shut it down again.

Now, you need to look at the datasheet to see the waveform for segments to white and segments to black. Unchanged segments need to be the same as the common bit, so no current flows through them.

Note that for white-on-black the added/deleted bits are the other way around, but the unchanged segments aren’t.

Finally, for every section of the waveform I take the corresponding array out of my changes, send it, and wait for a bit.