Showing posts from December, 2008

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…


For a new assignment for my students I decided to show them they could build a simple P2P software. So I prepared a simple P2P protocol specification and a sample implementation. The whole system was design with the idea that students might run several peers on a single computer (for testing purposes). Effort was put on making it simple to understand and to implement (and to test), there are many improvements possible that will boost performance but those were rejected in favor a simple system.

I did search on the net for a simplistic P2P but I did not find that so I wrote this. I like to hear from other simple P2P protocols you may know.

Three cool tools from Google

Like many of you I do have a hard time trying to keep up with all the new services offered by Google. I've been testing a few of them recently and I've found them quite useful:
Google Analytics is yet another service that will inform you about who, when and where you're site is getting visits from.Google Sites enables you to create a website just yourself of with a few collaborators of your choice. No HTML knowledge seems needed. Up to 100MB of free storage is provided too.
Google Trends allows you to know whether a certain search term is becoming more or less popular lately by know how many searches are using it over time.None of these services is really new but now that I've come to use them I can recommend them. Given they are all free services I cannot complain about the price.

Better batteries for arduino wireless sensors

It was pointed out in a previous post that CR2032 batteries won't be happy with 60mA peak consumptions (ie: battery voltage will drop causing the sensor to stop working very soon). I've been looking for a better choice while still small and light. A tip from a colleague seems to be a very good choice: ER1450 from this catalog.

Pay-per-bid auctions

Like many of you, I'm familiar with auction sites like eBay that allow you to bid on a certain item following the model of an auction: Winner is the user that makes the highest bid. Item price is just that winning bid.

eBay makes money charging a fee for each transaction. (I know there are many details, happy and unhappy sellers and bidders but that is another story).

What surprises me is that several companies are advertising their sites as auctions with a certain twist. Apparently they offer a real bargain, where "winning bidders" may save more than 90% of the retail price of a brand-new item.

I prefer not to include any link to these companies, but they all share a common feature: While they use the word auction they are not really meaning that. The fine print details explains (to the attentive reader only) that you have to pay to make a bid and that only your bid can become a winning bid by chance (without you having all the information at all times). Instead of the ite…