Showing posts from December, 2010

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…

At last, Canon S95 RAW format supported on Snow Leopard

It's been half a year since Canon PowerShot S95 appeared. Today I'm happy to learn that together with a software update to the "crashy" iPhoto '11 comes a software update for new cameras on Snow Leopard.

Playing with Kinect

I was learning OpenCV for a new art project, but then I learned that the new Microsoft Kinect device had been hacked by a Spanish student after the bounty offered by Adafruit Technologies.

This news changed it all, as Kinect drivers for several platforms were made available. I needed to extract the silhouette of a person from the exhibit space and having a depth image as the one Kinect provides made my job ten times easier. The previous plan was to keep an image of the background and substract the current frame from it to detect changes. But handling changes in lighting conditions was a bit challenging.
What Kinect provides is a regular color (or infrared) webcam plus a second camera that measures depths (ie. each pixel brightness represents the distance to the kinect of that scene point).
If you want to isolate object from an scene that are at a certain distance from the camera, all you need to mark those pixels between a certain value range on the depth image. Simple, fast and h…

How not to buy from Dell

I had some funds to kill and I thought a new small laptop running Windows 7 would help me not to be a total illiterate when it comes to whatever changes come with W7. I wanted to replace my old Acer Travelamte 3002 WTMi that served me well (though loudspeakers failed almost from day one).

A quick look around the web showed that Dell M101z model could be a good choice: good value, acceptable battery time, small and not too heavy. I've never bought from Dell before but I guessed it won't be difficult or unpleasant: I was wrong.

First of all, I wanted Dell to produce an invoice to the name of my employer. I contacted with Dell chat (sorry, not available over the weekend) and I asked them for help. I was provided an email of a Dell representative dealing with my employer. I sent her an email and waited.

After 24h with no answer, I contacted Dell chat again asking how long should I wait to get an answer, as this being my first time with Dell I was not aware of what the typical service…