Category Archives: Uncategorized

Norwegian TwoClock Clone v.1

I loved the TwoClock since the first time i saw it. But the prices were insain. And I thought, how difficult could it be to make it myself?

I had a couple of 8×8 RGB matrices laying around, and with help of the great Adafruit tuturials ( figured out how to address the RGB pixels.

Started the deveoping of code with the Arduion Mega 1280, for easy access to IO. When I was done, I moved on to use Arduino Pro Mini ATmega328P clones from China.

The norwegian telling of time is a bit different from english. instead of “half past one”, we say “half two”. And “twenty past two” becomes “ten to half three”. So my code is pretty much useless for the rest of the world, unless you redo the logics.

Code is here:

Cycling through possible combination, 5 minutes per second

Ubuntu Kernel 4.13.0-26 breaks AMD Drivers on mining rigs

A week ago my Ubuntu mining rigs started failing one by one. The only thing I had done was rebooting them.

LSHW shows all display cards as *-display UNCLAIMED. Googling a solution for this got no definitive solution, everywhere they say the AMD driver was broken.

CLINFO shows zero GPU’s

Starting XMR-STAK-AMD gives this error, meaning it can’t find any GPUs.

Since I had spent so many hours trying on trying to fix this issue, I came to the conclusion that the easy fix was to just reinstall Ubuntu 16.04 with new driver install. And after the install, I would prevent the kernel from updating with this command:

Show the menu choices at Grub start

Meny items starts at 0. The kernel version I want to switch to is 4.10.0-28-generic which is item number 6. Open Grub and setup this meny item.

Change this line from 0 to 6.

Update Grub and reboot




IOTA node

Create your own IOTA node.

This looks awesome.

Connect your IOTA Lightwallet to a norwegian (my) server:

Running XBIAN Kodi on SSD on Raspberry Pi 3

I have build my own little cinema room with a 109″ projector screen. Through the years I have used prettu much every media player there is. There is allways some limitations on control, display and movie handling. The latest years I have used Kodi media player, formerly known as XBMC, on a Raspberry. First on a RPi 1, this could only play 720p smoothly, then on a RPi2 that played 1080p smooth, but not including DTS sound. At last we got RPi that plays 1080p with any sound perfectly.

But still I’ve had some glitches playing movies over the network, even with 100MBit networks speed. So I though there was some buffering problems. Found the settings for buffering, and killed my MicroSD card in a week…

I have a bunch of small SSD laying around, and some I have put in a USB cover. The SSD would handle all the buffering writes much better. And maybe it would be faster.

Here is the step by step guide that worked for me.

    • Download XBIAN Kodi, there are others, but this one have worked best for me.
    • Burn to MicroSD card with Rufus (Windows), Etcher (Windows/MacOS) or Linux Live USB Creator. All these works perfect.
    • Boot up with MicroSD to check the system is running OK. Note the IP in Kodi.
    • Clone the Xbian Kodi MicroSD to SSD with this Adafruit guide. Pay attention to page 2 where you set up the Rpi to boot from SSD. The MicroSD card still have to be mounted.
    • SSH to the Rpi with defult login: xbian and password:raspberry


<cache> – When set to 0 the cache will be written to disk instead of RAM
<buffermode> – 1) Buffer all filesystems (including local)
<readfactor> – This factor determines the max readrate in terms of readfactor * avg bitrate of a video file. 

  • Starting up Xbian Kodi with this setup from SSD, and I can play 40GB Bluray rips *cough* I mean backups, over network with no problem. The menus are also much faster.

Wordbrain Solver – 6×6 – With filtering v.3

I have shortened down some of the code, added clearing of screen before printout and added support for 6×6 puzzles. I have not got this far yet, so I have no idea on the runtime. But I’ll guess it is exponential from 5×5. This means I need to add the check of two first and last letters, maybe also another one for the three first and last letters. I wanted to add some more sexiness to the printout, so I made an old school percentage bar. When I start the program in Terminal, it looks like this.

The new code is here:



Wordbrain solver – letter permutations

When you are stuck after partly solving a puzzle, there is a chance that the puzzle is solved in the wrong order. Using my path seeking algorithm might not work, since the letter are in the wrong place in the matrix. The remaining letters are however correct. This is why I made a simple program for finding all possible permutations of the remaining letter, disregarding the location. The program also compares against the Norwegian dictionary. You type in the letters and choose length of the word.

The program uses a library for permutations:

Norwegian dictionary as Python dict format: wordDict.txt

Terminal output:

Wordbrain Solver – 5×5 – Brute-Force with filtering v.2

Second attempt for this. The previous 5×5 code was estimated to use 12.5 days to get all possible words. Going through the code, I found some weak spots:

  • No control of word length. The program was traversing through words of lengths up to 25. This means extremely long paths with extremely many different variations. Reduced this to maximum traversing 9 letter words.
  • Checking all possible paths, even some that was unnecessary. I made a new dictionary containing all existing first-and-last letters  in a Norwegian dictionary. This way, instead of checking all possible paths between example ‘z’ to ‘ø’, I can skip all these paths immediately, as no words starts and ends with these letters. This would skip 1/600th of the total time.

This reduced the solution time from 22500 minutes to around 7 minutes (!!!). The 4×4 puzzles was also reduced from 10 minutes to 40 seconds.

Implementations for next version:

  • Create a wordlist for all two-first and two-last characters existing from Norwegian dictionary words. This will skip even more unnecessary paths for finding words.
  • Add a filter for the words lengths necessary, the puzzles will show example three-letter, five-letter and nine-letter word.
  • Move all found words to separate dicts and make a function that deletes all words containing one letter, in cases when a word found contains the last letter of one type. This is a quick way to “thin out” the possible words.