Showing posts from February, 2006

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…

Shiny new laptop

I did it again: I fell for another new toy. This time the winner was the inexpensive Acer 3002 WTMi that packs quite a decent feature set into a small size and weight. I won't bore you with the details, but have a look a it if you're planning to buy a light small form laptop .
It comes with WinXP Home Edition installed and, as usual, you'll have a hard time if you try to get a refund on it. Microsoft's tax seems to be a burden if you buy a laptop either you like it or not. Although I've installed SuSE Linux 10.0 I'm not very happy with the results for the moment. First of all you need not to use APIC for the installation to start. The system installed very quickly and it did one of my FAT32 partitions to shrink without any problem. It took less than 15 minutes to get the install finished.
What I've got working are graphics, WiFi, Bluetooth, Ethernet, DVD-RW and synaptics mouse (the latter even better than with Windows) but sound is missing (it looks like an I…

Breaking your nerves

Dealing with software you cannot change is a risky business. This time I need to emulate a serial communication to fool the software to think it is talking to a directly connected device. I have tested several serial port emulation software with not much luck. However I have to tell you the guys at Fabula Tech have a winner with their Network Serial Port Kit. It worked like a charm, providing a way of sharing a serial port on one computer so a second computer could use it remotely through a network connection. Not only this, but these guys have a fantastic on-line support chat that, contrary to most of them nowadays, they are knowledgeable and they solved my problem at the first shot. Really recomended product and service.

However, I needed a solution I could throw at a client's computer even without network card. I looked around for serial device servers and Digi One SP looked a good choice. I bought a couple of units to see if they could really replace a serial cable (you replace…