Showing posts from February, 2005

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…

MPlayer rules

I've been using MPlayer quite extensively since I built my digital satellite receiver two years ago. I use MPlayer to play AVI/MPEG/MPEG2/OGM video files and I use MEncoder to actually create such files from MPEG2 broadcasted shows.

These command-line tools that are both great and free software. Tools are based on standard video codecs and there is even support for commercial codecs (provided you get their dll files). I've used MPlayer on Windows, Linux and OSX without any problem.

If you are a perfectionist a great deal of fine tuning of codecs parameters is possible. If you are "good enough" guy (as I am) you'll be pleased with default behavior most of the time (both in terms of computing speed and output quality).

MPlayer is a program to play video/audio files that can also dump audio to a file. MEncoder allows you almost any transformation of your multimedia files (video+audio) plus different filtering options and limited stream cutting. My main use is to reco…

SuSE 9.2, not this time

This distribution is available on for a month or so. You can dowload the installation DVD or you can do an FTP-based install by booting your computer with a small (60MB) ISO image.

I've been using SuSE for three years now and I am, most of the time, quite pleased with it. It is my main distro and I like to have DVD full of software I can install without having an Internet connection. I do like the online update feature too.

I have been upgrading my systems every now and then, mostly because newer KDE versions use to inlcude lots of fixes and new cool features. But when I tried 9.2 to install in my trusty but old Toshiba Satellite (128MB RAM only) it took around 6 hours. Afterwards the system took, everytime, a lot of time to boot because it froze for a long while on udev. And when it booted KDE was almost useless as it was slow to a crawl.

The system was still acceptable, but slow, on SuSE 9.1. Because I had an Ubuntu install CD around I used this instead and now my o…