Posts

Showing posts from May, 2008

Moving code from ESP8266 to ESP32

Image
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…

Dead router

Image
Yesterday night my router died on me. Apparently it is no longer coming up after powering it up. Minutes later it seemed that a hardware reset had brought it back to life: It was not true, while DHCP and router lights were working, only a firmware reload web page was available.

After downloading several versions of firmware it became apparent that the damage to the router was beyond the original firmware. Time to buy a new one (or to check with SMC whether a lifetime warranty was included).

However, hours later I came across this news. I know it may sound a bit paranoid on my side but timing was just perfect.

While I wait the new unit to be delivered, I've borrowed an ASUS WL-500G from the lab. I've been told this unit has a lot of potential once you reflash it with new firmware. A couple of cool projects are possible: OpenWRT or DD-WRT.

Awesome web service

I was browsing this photography blog when I learned about a cool and very useful service. The image below describes better than I would do it what it is about. In the past I featured a similar service but I've found this new service better.


Assignment #4 - Get more documents

Please note I throw at it the first document I've found on my desktop. It seems to handle many different type of popular office files. I think I'll be using this system for my students in the future.

In order not to change my site CSS code I've shrunk the width of the embedded object a bit too much :-(

You may use the link on the left bottom side of the image to go to the home page of the document where it will be shown full width.

More on RGB LEDs

I was thinking about controlling multiple color LEDs to make an elaborate panel with different light areas that can be contolled remotely from a laptop. As each LED needs three PWM outputs and many microcontrollers have just a few of them (I mean PWM outputs) the use of a microcontroller per LED makes sense. It did for this project.

I've just changed the LED type for a Superflux RGB LED to get what you can see in the video. The next step is to make a version that can be addressed (also available from the same site) so as each LED can be commanded to show a certain color. (One PIC 12F675 plus a Superflux LED cost less than $2!).



I'll be using an Arduino board with an XBee wireless module to control a bunch of leds. Alternatively I could use a Wi-port to control the panel via wifi.