Showing posts from November, 2011

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…

Arts exhibit

I've been quite busy lately so I've not been posting news but doing new stuff. A few weeks ago a new exhibit it the City Museum of Valencia by local artist Rubén Tortosa stated and one of the pieces was this one, which I designed and programmed.

It is an interactive installation that grabs the visitor silhouette and then it draws it onto the wall at a random location. Drawing accuracy is not intended (or so I was told by the artist). We went for a very simple design, based on my vertical plotter, and a Kinect device was used to gather the images. You can see below a sample of some the drawings of the very first days of the exhibit.

The exhibit will be open till the end of this year and there is no entrance fee. Together with the installation there is a set of interesting pictures I have nothing to do with.

Update: Wow, we're on the Arduino blog now. Arduino code is quite unremarkable as we use a couple of Pololu motor controllers driving the stepper motors. Processing code

The beauty of OpenSCAD

All the CAD software I have used in the past was based on a GUI. AutoCAD does include a language so you can type commands and create macros too. But the way OpenSCAD is surprising (to me) and very useful: You "program" the objects you want to create. It is all based on a scripting language and the concept of constructive solid geometry. You can define basic shapes, like cylinders, spheres or cubes and then operate them to obtain the design you need.

You can experiment with this technology in Java3D too.

Once you have created your design, you can save the result as a variety of file formats, including STL. STL format is supported by most 3D printing tools, including Reprap project software tools (and Skeinforge). Many of the objects available in have been created this way.