Posts

Showing posts from March, 2009

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…

Iomega Screenplay Pro HD hacks

Image
I was not sure what gift I would get for Father's day. A colleague of mine was very happy with his last gadget, a multimedia hard disk that could reproduce High Definition content from its 1TB disk and it could also record from a video input.

I already own one (older) version of that (Freecom Media Player) so I was not impressed with the idea, but my friend insisted I should try his unit at home.

I brought the system and I hooked it to TV. I tried some HD content I had around and I liked what I saw, so I was sold. I would be replacing my TV computer whose SAT receiver card is no longer in use as I switched to a cable provider years ago. Still that computer was serving me well, still with its original SUSE 8.2.

The Iomega unit does have HDMI, components and composite video outputs, plus an optical audio output. It has a host-mode USB socket that accepts external storage (i.e. another hard disk). It can also be connected to a computer by USB (a B-socket in this case) to be used as exte…

Electronic magazines "made it simple"

Image
A few years ago I was excited when Zinio started (what was to me) a new business: Electronic magazines you can download and see them in your computer display. Zinio model required a DRM-ed software on your computer and Internet access to double-check the binary file you've stored in your computer was one you're entitled to see.

Platform-dependent and not so flexible made me walk away from Zinio. However, for a number of years I've been a paying subscriber of Circuit Cellar magazine whose model was, IMHO, simpler and better: a PDF file.

Today I've learned that this magazine (that sometimes has featured articles by me) is adding (not moving) a new flavor for their electronic version. One version powered by Mymaganizes.net, that in essence is a Flash-based viewer similar to the one at Issuu. I guess that besides free content the company also manages users subscriptions.

By checking on-line I can see that now Zinio has also enabled a browser-based reader that does not require…

Modbus/TCP

Image
A recent project I'm working on needs to behave as a Modbus slave. Not that Modbus is a complex protocol, but it is always handy if you can save yourself the effort of doing your own implementation. After some trouble I've got FreeModbus library up and running.

While looking around I've also found some cool tools like modpoll that can allow you query a Modbus slave. And while I had some trouble with the Linux binary (libstdc++5 was missing), the Windows binary runs happily under wine too. Another great set of tools are these ones. You can even connect your Excel spreadsheet to values obtained from a remote slave!

It was fun to realize there is even a Modbus for Arduino implementation.

Tidying up your photo/songs collection

Image
Over the years and hard disk changes and backups and new computers and OS installs I've got a pretty untidy photo collection, scattered across several disks.

I wanted to make a clean and tidy library on my main desktop using F-Spot. Unfortunately this program does not have yet a duplicate detection feature (it seems to be available in the latest version though). So I've ended up with many photos repeated on my new library after importing from different backup copies.

I thought I could do a simple script to find those files with matching md5sum, no matter the filename, so I could remove the photos that appear more than once. But I was glad to see that somebody did it first.

Of course the same idea could be applied to MP3 files or any other type of file. The only drawback, if you want to be picky, is that md5sum covers the whole data of a file, so a change in let's day EXIF data in a JPEG file will render the file as different even though it may contain a duplicate image. Same …

Slidecast = Slideshare + podcast

It's not new. It's not original but it seems to me the easiest way to put together some audio with a synchronized slideshow. I mentioned Slidesharethree years ago, but now I've learned they offer a cool on-line service (no software to install on your computer) to create synchronized-audio slides.

Vertical printing machineView more presentations from hj43us.