Posts

Showing posts from July, 2009

Moving code from ESP8266 to ESP32

Image
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…

Technological jumps

Image
From time to time we witness significant changes on how things are done. In terms of how we listen to music in the last ten years I've seen several interesting changes.

Ten years ago I bought my wife her first MP3 player: It was Diamond Multimedia with 32 MB (yes, Megabytes) that could hold a couple CDs of 128kbps MP3 music. Since then on I've bought many other MP3 devices for my household. However, that marked the end of traditional media (CD-audio) for our portable uses.

While MP3 players have been around for quite a while, it seems that Apple's iPod is now the king. And while kingdoms do not last long in this market I guess Apple has done something right.

Many people (like myself) are device-centric. For quite a while I favored Creative players and while I've never bought music from iTunes, I've bought some software there. Meanwhile I've stopped buying from Creative after problems with several players.

And now that I have time I've played a bit with another …

Visit Norway

Image
It's been hectic times around here, mostly due to different changes at my workplace. Now it's time to start thinking on having some vacation. A summer trip seems a good idea but this year I've selected Norway: beautiful but expensive.

While there are tons of information on-line, I have found details are a bit sketchy. This is likely due to the fact I'm interested on cheap accommodation. Maybe the average wages in Norway are much higher than in my home country, Spain.

I've got some trouble getting things done online. There seems to be some odd behavior and this booking website, when browsed with Firefox on Ubuntu 8.04. The worst thing is that it was this the browser I was using when booking my flight with Norwegian.com and I was offered a very competitive car-rental price at the end of the airplane booking process.

Unfortunately when trying to go to book the car I was offered an almost empty page. I was wrong when I thought I could go back to the former page too. So I …