SQLite3 C++ Wrapper Class

I really love sqlite3 databases. They are small, scalable and just do the job. The only thing they need is a file, so they are also much easier to configure, maintain and backup than heavy database solutions like MariaDB, MySQL or PostgreSQL. For bigger class applications they do a very good job, for most of my personal projects I prefer sqlite3, because they are just slim and easy-to-use.

Due to my affinity to Python I wrote a small C++ Wrapper Class, that should make it easier to handle Sqlite3 database connections in C++. In just 200 lines C++ code. It's really easy, no Voodoo involved.

But have a look yourself at this 13 lines C++ code, that create a table, insert values and read them out.

Tested under Ubuntu 16.04 and Arch Linux. I suppose it also runs on other platforms, but I've not tested it. Use at own risk ๐Ÿ˜‰

AMD releases amdgpu-pro driver 17.30

Just some time ago, I let myself go and wrote about how upset I was about the (missing) support for my new RX 470 on Linux.


Today AMD released the amdgpu-pro driver 17.30, with support for Kernel 4.10 and Xorg 1.19. So my setup is finally not useless anymore. Details are on the AMD download page.

I've just installed the driver without any problems, after a reboot it works just fine. Videos are playing and I could start Civilization Beyond Earth from Steam under Ubuntu 16.04.3 with HWE.

It's two and a half minutes to midnight

The doomsday clock is at two-and-a-half minutes to midnight. The doomsday clock is a illustration of how close we are to a man-made global catastrophe, published by " The Bulletin of the Atomic Scientists' Science and Security Board".

Last time it was at that level has been 1953, during the tests of the Hydrogen-Fusion bombs.

Source: Wikipedia

The main reasons are

  • Rise of nationalism
This already-threatening world situation was
the backdrop for a rise in strident nationalism
worldwide in 2016
  • Trump
Donald Trump, made disturbing comments about
the use and proliferation of nuclear weapons and
expressed disbelief in the overwhelming scientific
consensus on climate change.
  • Conflict USA and Russia
both countries (USA and Russia)
continued wide-ranging
modernizations of their nuclear
forces, and serious arms control
negotiations were nowhere to
be seen
  • North Korea
North Korea conducted
its fourth and fifth underground
nuclear tests and gave every
indication it would continue
to develop nuclear weapons delivery capabilities.
The full statement is available here.

I consider this bulletin as a calibration to reality and a big F**K YOU in the direction of nationalism and the disbelief in science.
Although I'm a big Fallout fan and like the concept of Vaultec Vaults, it's not that we should now go and dig a whole in case of some president having a loose finger on the Atomic Football, but it is worrisome.
And I use it as reason to motivate more people to do a HAM-radio course and buy equipment ๐Ÿ™‚

Lightning Monitor - Update

Because of heavy rain and thunderstorms this weekend, I had some time to work on my lightning monitor again. With success, I could reduce the "DISTURBER DETECTED" messages significantly by putting the device away from the laptop.

Even better, it was starting to measure lightnings during one of the thunderstorms! Great ๐Ÿ™‚

The data makes sense, since we really have been in the center of the thunderstorm. I could verify that the distance estimation works pretty nice, because another thunderstorm that was in a nearby village was giving me lightnings with a distance of 5 km.

The current Arduino sketchbook is, as usual, on GitHub.


Nice thing for a rainy Sunday!

GPX to GeoJson convert tool

I hacked a C++ tool for converting GPX files to GeoJson, because the only one I could find used Node.js. The tool is available on GitHub. Binaries are available for GNU/Linux, the tool should be compatible with MacOS and Windows (Not tested).


Runtime comparison with togeojson (Node.js)

And now with my tool


It's dirty, I wrote in in about an hour, but it does the job for my purposes and I want to share it in case someone else finds it useful.

Lightning detector - Kickoff

I recently purchased a MOD-1016 chip for lightning detection in order to improve my weather station. The chip is based on the AS3935 chip and ships as a complete I2C-ready breakout module from embedded adventures.

First steps

I skip the following parts because I consider them trivial:

  • Soldering
  • Wiring to a Arduino Nano

The wiring part is actually the most tricky part, I will provide the schematics once I have a running system. For now I focus on getting the system online. The wiring on the following picture is accurate:

Wiring of the MOD-1016 to the Arduino Nano

I put everything together in a nice box to protect the electronics from the environment. In the end it will end up outdoors in my garden.
The box is IP55 compliant, so when deployed for real I will put it in additional plastic bag to avoid any issues that comes from rain. For the first experiments IP55 is fine. And this is how it looks like

Wired box, open

A small reader program is in my meteo repository (in the Lightning directory) on GitHub, and I let it run for 1.5 days.
I had some problems with the serial port on high baud rates, so i configured it for 9600 baud. The serial connection over this period was fine, but it seems that the location has too much interference.
All I got was constant "DISTURBER DETECTED"

Right now all I get out is "DISTURBER DETECTED"

Looks like I need some fine-tuning. I disconnected the device and will run some tests with my laptop on the go.

For now I have a running serial connection, the chip delivers some output, so I'm expecting that with some fine-tuning I should get this thingy running soon.

Sapphire Nitro Radeon RX470

About a month and half ago I purchased a RX470 and I want to write my experience with the card so far. I am not happy.

Originally I wanted to have a nVidia GTX 970. But the RX470 had 8GB RAM instead of 4GB and, more interestingly, the double precision float operations should be significantly faster. I had terrible experiences with ATI Cards and Linux drivers in the past, but I thought, since they have made some progress, it should be also a problem of the past.

I was so wrong.


So, I picked up the card and build it into my computer. Display was ok, GRUB and the BIOS displays are ok but somehow my Ubuntu doesn't come up with it.

*sight*

Found out, AMD/ATI are not supporting Kernel Version larger than 4.8 - The DKMS driver doesn't build, because of an API change for linux/fence.c.

So I had to install Ubuntu 16.04 with Kernel 4.8. I had to uninstall my production system. I was really pissed.

After some some tries I managed to install the driver and was quiet happy for about a month, when a planned kernel update killed again the functionality. Of course, I forgot.'
So, again my production system was down. I though, well some time has passed, they have updated the driver for sure. Again, wrong. Even worse, AMD suggest to work with Ubuntu 16.04.02 and, quote

the recommended best practice is to install from 16.04.2 media but disable installation of updates.

Are you kidding me?!???? You are honestly recommending not installing Updates!??!?

I'm now stuck with the system and trying since two hours to get it back running and it's just a nightmare.


So, my conclusion so far: The hardware is cool and has nice specifications but the support for Linux drivers, even the mainstream versions, is still unacceptable.
I really hope they will improve their drivers for Linux.

I'm going back to nVidia.