Posts
AVR-GCC Register Usage
· β˜• 3 min read
Which registers do I need to preserve when calling C++ code from assembly, and vice versa?

Fixing Lyx for HiDPI Monitor
· β˜• 1 min read
My new laptop has a 4K monitor and my tool of choice for writing my Arduino books, Lyx, always displayed the toolbar icons as “so very tiny, it is hard to see the damned things!” After much experimenting with the monitor’s scaling, fractional scaling and such like, I found QT_AUTO_SCREEN_SCALE_FACTOR which should fix things. I tested: 1 2 export QT_AUTO_SCREEN_SCALE_FACTOR=1 lyx & and yes, the icons were now usable. Hooray. I just need to make this permanent.

Migrating from Wordpress
· β˜• 4 min read
So, after many years of happy blogging – some years more often than others – I’ve finally run out of hosting space with my cheap and cheerful hosting provider. I thought about just paying for more storage, but with retirement and the closing of my – and by “my” I mean, “mine and MrsD’s” IT Company – I decided that a full Wordpress website wasn’t really necessary, what with its need for a database such as MySQL and PHP.

Backing Up My Books
· β˜• 3 min read
I have a lot of eBooks on my tablet and phone. I also have a backup on my Linux laptop. In the past I have often just plugged the tablet into the laptop, opened the appropriate MTP folder, selected everything and copied them all to the backup, overwriting the previous backup. There has to be a better way, surely? Step up rsync. The problem is the MTP mount, however, I found a way to make it work.

Arduino Internal Temperature Measuring
· β˜• 3 min read
The code below, somewhere, shows how to measure the temperature of the ATmega328 microcontroller built in to numerous Arduino boards. You can find all the gory details in my new book Arduino Software Internals available from Apress, Amazon and good bookshops everywhere. A complete guide to how the Arduino Language works, and how it makes the hardware work. Apress.com: https://www.apress.com/gb/book/9781484257890 Amazon.co.uk: https://www.amazon.co.uk/Arduino-Software-Internals-Complete-Language/dp/1484257898/ The Warning Do not use this code if your Arduino has the AREF pin connected to any voltage source.

Build 64bit OCILIB Libraries for CodeBlocks
· β˜• 5 min read
I tend to compile with gcc, in a bash session, on Windows 7. I use Code::Blocks as my IDE of choice and one of my projects, well, quite a few, use the excellent OCILIB library for accessing Oracle databases, by Vincent Rogier. I can’t recommend this library highly enough. However, it comes with a Code::Blocks project file to build 32 bit libraries, but I need 64 bits. Here’s how I do it.