Category Archives: code

XLS to CSV

A common situation for us (people in the programming/computing/processing world) is that we don’t always work with the same tools as some of our non-tech peers.

Case in point, I received a big bunch of files in XLS/XLSX format, very big files, LibreOffice has trouble working with them. Since I want to perform quick processing on that data, and I already have scripts that process similar data in CSV, the simplest path is to transform those files to plain, ugly, useful CSV files.

Then again, there are 100 files, and I don’t feel like dancing around each one: opening, clicking save as, selecting CSV, telling LibreOffice that this is a semicolon separated CSV file … etc etc.

Entering pandas.

continue please

Advertisements

Leave a comment

Filed under code, tips, tools, Uncategorized

DBPedia Daily Map

dbpediamaplogo

I am pleased to announce the DBPedia Places map. Since I wrote my master thesis about vague places I wanted to do something like this. The vague-places generator was one of the outputs of such work, but I felt the need to see DBpedia points on a map, changing every day.

The final result can be poked at the dbpediamap.tk, this post is an overview of how this small project works.

As a quick taste, here’s a screenshot showing a dataset presented on the website:

DBpedia viewer USA

DBpedia viewer USA

Explain me a little bit more

Leave a comment

Filed under code, gis, Maps

Cortex-M0 Boot

stm32f0_img

Still alive and kicking. And with another year in my back in Embedded Development.

My recent tamperings have been about creating a bootloader for a Cortex-M0 µ-processor that performs firmware update either from UART or SPI.

There was a interesting bit on how to set-up the system to have two Firmwares running (Boot Mode and application mode). And that is what I’ll explain in this post. How to set up a project to build a boot and successfully run your main application.

Boot me up

3 Comments

Filed under code, electronic

Quick Unit testing with C

throwtheswitch

Unit testing is something that lots of developers are used to, and in environments like Python or Java can be even bundled in some awesome libraries. Easy to use, easy to implement, great results.

Then it comes C Embedded: The environment is different, even the people is different!!. Praising the benefits of unit testing is not that easy sometimes, even writing the unit test functions is not as straigtforward.

In this post, I’ll talk about Unity, a small unit test library for C.

See how we test

Leave a comment

Filed under code, tips

Arduino RTClib explained

p1403360560_ds1307_small

One of the main functionalities of the clock will be… suprise surprise, keep track of time!

For this task we’ll interface with a DS1307 RTC using the RTClib. You can just include that library and forget how it works. But that’s not the way this blog works. Let’s dive a little deeper.

How arduino RTClib works

Leave a comment

Filed under code

A 3×3 font for Led Matrices

fontIcon

For the clock project I require text to appear in a small container, that is 4×4.

Since in this 4×4 I have to add vertical and horizontal spacing this ends with a 3×3 font.

Never in my life I designed a font, and if you check my hand writing… it is horrible. Luckily 3×3 only leads up to 2^9 options, 512 different characters, and I believed I could handle this.

After writing the font in a squared notebook, I checked that other fronts already exist, and, unsurprisingly they were very similar to mine.

Show me your font

Leave a comment

Filed under code, curious, DIY