Showing posts from December, 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…

Fighting with online shops too

Today I have got one bizarre experience. A few days ago I did shop some parts for a 3D printer I am building but I guess the site was overloaded (or poorly procured) and I got several errors till I got my order through.

So I decided to ask the seller about my order since a few days have passed without hearing from them. This is the chat transcript.

Start Time: 12/31/2013 00:06:30
End Time: 12/31/2013 00:35:14
Operators: Jayla
Please wait for a site operator to respond...
If you do not want to wait, please click here to leave us a message.
Operator Jayla has joined the chat.
[00:06:30] Jayla: Hi Miguel Sanchez, I hope you are doing fine. How may I help you? 
[00:06:38] Miguel Sanchez: HI
[00:06:54] Miguel Sanchez: I'd like to know about my order. 
[00:07:32] Miguel Sanchez: It's been a few days and it is my first order from you. But mostly the server was giving me errors while going through the order.
[00:07:45] Miguel Sanchez: 26 dic 2013 16:18:12 PST Id. de transacción: ****…

New tool for the workshop

A recent query from a local company made me revisit the work I did for reverse-engineering Ademco's
ECP bus years ago. I did not get this assignment but I learned this company was buying an inexpensive logic analyzer I have never heard of before.

After having a look a the device and its demo software (that works in Windows, OSX and Linux!!) I was sold. Even better was to learn that they do have an educational discount. Next day I bought one Logic8 8-bit USB digital analyzer.

It is not a digital osciloscope but a logic probe with 8 inputs. The beauty about the software is that it has built-in several serial protocols (ie. Async serial, I2C, SPI, etc). So going from the signals to meaningful data is time-effective and simple.