ps2pdf converter

converting ps or eps files to pdf always left me with the wrong cropping of the image/page and with a white border that messes up the formatiing. To avoid this I convert the files using the following command:

ps2pdf -dPDFSETTINGS=/prepress-dEPSCrop test.eps

Backup of Google Authenticator data

In case to got a new phone and want to move the Google Authenticator you will need to move the secrets from all the sites you added to the app. Or you are just curious what is actually being stored on your phone :-)

Since I usually use the QR-code to create a new entry creating a backup is usually quite troublesome for me; I simply have no idea how to recreate the entries. But, its possible to download the apps database using adb. Well, that is if you have a rooted phone.

First you need to enable the adb USB-debugging somewhere in your settings. This depends on your phone, so you will need to look online on how to do it in your case.

After that you can connect using adb:

 :~$adb root

The root is important since otherwise you will not have access to the app-related database files. Next we can copy the authenticator database that includes all the entries of the app.

:~$ adb pull /data/data/com.google.android.apps.authenticator2/databases/databases
196 KB/s (16384 bytes in 0.081s)

Finally, we are able to open the sqlite3 database and print the info we need. I replace the actual output with some meaningless text, but its clear what the secrets are.

:~$ sqlite3 ./databases
SQLite version 3.7.15.2 2013-01-09 11:53:05
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>select * from accounts;
1|YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY|
sqlite>.exit
:~$

And that was it. Now you only need to re-add the secrets in the new phones authenticator app and you're done.

cheers

About writing...

At times, I find it extremely difficult to transform my ideas into text. Writing a text itself is not the difficult part, I can fill pages in no time. However, getting the meaning of the text right so that it states what I intended, is a completely different story. I often find myself deleting entire paragraphs that need to be rewritten. And I do this over, and over, and over again.

In a previous post I posted a link to list of tips that can be considered to improve story writing, today I would like to do something similar. This page does not focus on story writing by itself, but instead on writing good text in general and gives tips on how to create a healthy writing habit.

Writing is tough for me and it seems the only way to improve this (well, tiny improvements are still improvements :-) ) is to write more. Every day.

Arduino Pro Micro issues

I just spent at least two hours trying to figure out how to get the Arduino Pro Micro running again. I will spare you the details of how I figured out what to do, so here is the solution:

sudo mv /usr/share/dbus-1/system-services/org.freedesktop.ModemManager.service /usr/share/dbus-1/system-services/org.freedesktop.ModemManager.service.disabled

Lets hope it keeps on working :-)

Reading RC Receiver values (version 2)

Hi,

in a previous post I briefly showed how to read the sum signal of a receiver that is able to output the signal. Although the code works quite well there are several issues with the code:

  1. calling pulseIn(SignalPin, HIGH) blocks until the corresponding pin is set to HIGH, which is a major waste of time, because no other calculations can be performed in the meantime
  2. I noticed that every now and then the readings start to glitch causing unwanted noise

To cope with the first issue I used  Arduino's external interrupt feature that calls a callback function for every rising edge. In addition I wrapped it in a class and defined it as a library for easy usage.

[update: 2013-07-28][update: 2013-08-02]
Continue reading

Pitot tube

Some time ago I wrote something about getting a cheap GPS receiver, a cheap AHRS, and how to read values from a RC receiver. All those tools can be put together to control an autonomous vehicle of some sorts. If the vehicle is a small ground robot nothing more is needed, except the vehicle itself, of course.I do not own anything that is capable of driving around outdoors, but I do own a small airplane. Continue reading

Timelapse

As a Christmas present I got a very nice tool for my Canon 20D from my parents. Its the "Meike Battery Grip for Canon 20D" and besides holding two batteries or 9 AA batteries, it has a set off really nice additional features. It comes with a build-in clock and a IR receiver so you can take images with a remote control. It is really well built and feels nice when connected to the camera, as if its a natural part of the camera!

Continue reading

e-paper display

I recently bought an e-paper display with a 2.7" screen size distributed by Embedded Artists. Since it does not consume any power between updates it is perfect to display status information for any kind of embedded technology. Since I am quite the Arduino fan my plan was to hook it up to one of them and simply use an existing software library to interface it. (Update available)(second Update)

Continue reading

Reading RC Receiver values

Hi,

Using a RC transmitter to be able to control aspects of a circuit controlled by an Arduino is a very nice feature. The first thing that comes to my mind is controlling stepper motors instead of servos, as they are way more precise. An easier example, but cool nonetheless, is mapping the input to a PWM signal for diming LEDs.

Reading the values of the channels of your RC receiver is not as complicated as I first thought.
That is, if you have a receiver that is able to output a PPM sumsignal.
I recently bought a RC set, the mx-10 of the HoTT series from Graupner.
The receiver GR-12 coming along with it is able to provide you with up to 16 channels! However, the mx-10 has 5 channels, so setting it to a higher value makes no sense in this case.

Continue reading