Showing posts from October, 2009

Moving code from ESP8266 to ESP32

A while ago I made a mashup of Dan Royer's code CNC 2 Axis Demo with my own code for trapezoidal motion stepper and servo control for ESP8266.

I assumed porting the code to the ESP32 would be trivial, and that was true for the most part: changes like library name being Wifi.h instead of Wifi8266.h were not a problem. UDP now does not like multicharacter writes but you can use print instead. So far so good.

However, when it came to the interrupt code I was stuck with the stepper interrupt causing an exception sometimes. And to make things weirder, the servo interrupt worked flawlessly (both of them had the IRAM_ATTR directive if you ask me).

Going little by little, I could narrow down the culprit to a floating point operation during the interrupt, that would cause problems sometimes but not always. Browsing around I found this post. Where the solution was simple: do not use floats within the interrupt routines but doubles. The reason was the float calculation would be performed by…

Merging PDF files

I do love Inkscape program. However, there is one thing it is still missing (it's not the program's fault though), the ability to handle more than one page documents. I recently was producing some drawings at work and I wanted to make a single document package with all the drawings to be emailed to my colleagues.

As I can produce PDF output from Inkscape, I searched for easy ways to merge several PDF files. I do know Adobe's Acrobat can do that, but I was looking for a cheaper alternative. I learned that you can use command-line ghostscript to get this done (provided you have it installed) easily.

gs -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=outfile.pdf inputfile1.pdf ... inputfileN.pdf

I learned too that it can be done online, in fact there are several sites (mergepdf, joinpdf) you can use.

Though there are certain limitations (encrypted PDF files are a no go), it seems I no longer have to worry about creating multipage PDF easily (of course it will be …

From VMware Server to ESXi

One of the cool features about some VMware products is that they are free. Both VMware Server and ESXi are free virtualization platforms. The main difference is that while VMware server is running on top of your computer operating system, ESXi is a thin software layer running over your hardware. That saves important resources that can be better used by the virtual machines you want to run on top. ESXi only uses 32MB of RAM. You can watch this presentation about ESXi. The main problem I've got at the moment to get ESXi tested is that I need to buy a SATA disk as PATA is not supported.

Kindle outside of U.S.

I've just read today on website a Jeff Bezos letter announcing the availability of Kindle for customers outside U.S. Of course this also means that wireless access is going to work in your country.

I'd be buying one now if DX was available. Unfortunately only 6" Kindle is offered at the moment. However I guess they will be adding DX soon.

Update: There are a few things that do not add up well. Kindles are only sold from U.S. at the moment. That means you have to pay customs, plus overseas shipping plus an slightly more expensive version of Kindle.

Another source of trouble is that Wireless acccess to Wikipedia from Kindle International has "experimental" status, whatever that means. It is not so with US Kindle. And to me, wireless free access to Wikipedia is well worth a price premium. But ... if Wikipedia access is dropped then I do not see enough value on the wireless delivery of paid content.


There are many ways to measure the "output" of a researcher. It is likely there are many ways to measure it because none of them is right for all the cases. While many consider citations of a paper as some type of endorsement of other person's work, there many ways to turn that into numbers.

And we want numbers so we can compare performance easily. I was asked the other day to provide my H-index. Problem was I have never heard about it before (only my fault). Just a wikipedia query later it turned out the idea was quite simple. H-index was proposed by Jorge E. Hirsch from UCSD and it is sometimes called Hirsch index or Hirsch number too.

This is how it is obtained: Take your publications list and sort it by the number of citations. Now start counting papers from the top (most cited paper) and continue down till the number of citations is lower than the count of papers. The current count (or one less) is your H-index.

So an H-index of, let's say, ten means that person ha…