Category: Programming

This will be a very, very short post. I found out there is a few things in my google code page I don’t have a “blahg” entry for, my old ClickButton library for the Arduino is one of them.

Basically, I was annoyed by some of my formerly named variables and some minor stuff (hello, OCD?). That, and also someone asked a question about it so I took another look at it. Above all it is untested, for now, so feel free to report back any problems. Or go back to the previous version.

It still just copes with one button, but I included a simple example using an array of ClickButton objects for more buttons.

It features basically two types of button clicks; short and long clicks, and can test for click-and-hold. Button logic does not matter (active low or active high buttons).

I removed the maxPresses (max click count) limit, it seemed unnecessary.

Until next time,


Finally updated RL-DAC after a while.

Although completely useless because of it’s very narrow use. Consider yourself warned 😛 Still, if fiddling with resistor ladder DAC’s your thing (it’s actually not mine), I suppose it might be of some limited use. Beware it also can be somewhat quirky, and it does take a few seconds to start from within the Processing environment (I use processing 1.5.1 running on a dual-core AMD64x2, 2.5 GHz thing with 4 GB RAM, that about covers it I think).

A screenshot:
Simple, Free Image and File Hosting at MediaFire Continue reading

First, a little disclaimer:

I’m by no means an expert on this subject. But I do hold a little interest in electronics (and programming. And procrastination. Sometimes I combine those :P).

Btw, It’s been a while since last time I blogged. I probably will edit this post a bit in the following days. Also, I finally made BloGTK 2.0 work in 64-bit Ubuntu 10.04 LTS.

Resistor E-series

(Screenshot from my little test program – Ok I’ll admit I’m no GUI expert :P)

Resistors come in fixed “preferred values” determined by what “E-series” they belong to. Which says how many resistors there are in a decade (1 to 10, 10 to 100, 100 to 1000 etc ohms).

The E series are standardized to have 3, 6, 12, 24, 48, 96 or 192 values pr. decade. E.g. E24 have 24 values. Generally the value is determined by a simple formula:

Ri = 10^(i/Eseries)


  • Ri = A “preferred value” resistance normalized to 1.00 – 9.99 ohm for the i’th index resistor in a given E series. Multiply or divide by factors of 10 for a given decade.
  • Eseries = is the E-series value: 3, 6, 12, 24, 48, 96 or 192
  • i = is the (zero-based) i’th index, up to Eseries-1 (2, 5, 11, 23 etc).

E.G. The last index in E24 is 23. The first is zero (always).
E series below and including E24 the is rounded to two significant digits.
Above E24 is rounded to three significant digits.

Continue reading

Morse endecoder

Morse EnDecoder



This is just a little writeup about a Morse code encoder and decoder I made for the Arduino platform. I spotted someone asking for one at the Arduino forum in november 2010, even offering a reward, but alas I was too late for that. No matter, for reasons unknown to me (I’m actually not that into Morse) this is one of many small projects I have been meaning to get around to, but lacking impetus I hadn’t yet done (as with many others). And besides, I would’nt really sell “my” morse decoder anyway. So I gave it away 🙂

Here is the project page on google code, with description of how to use it in your own programs:

What follows is basically just a little explanation as to how it works. Continue reading