Showing posts from September, 2013

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…

System upgrade "cloud style"

I have got a new computer for my office. The old system was still up and running and so I was a bit reluctant to replace it, but I finally bite the bullet as I could say no to a free new system. I was running Ubuntu 10.04 LTS 64 bit meaning that no major upgrade happened in the last three years to my system. Over time your system also gathers lots of drivers, small utilities and fixes that you only discover you had them once you've migrated to a new one.

So last week I used some time to install Ubuntu 12.04 LTS on the new computer, just to discover it won't wake up from suspend properly. The problem was the graphics card driver (an Intel graphics card in the motherboard chipset). But the only way to get the system back to work (without logging in from another computer) was to reset it. When I asked for help to another colleague he mention he had no trouble at all with a similar system. It turned out he was using Ubuntu 13.04 instead. So after almost a week of small installs I …