Posts

Showing posts from April, 2006

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…

JPEG and Wavelets

Image
I'm teaching a course on Multimedia Data Transmission and I had to give a couple of lectures on image encoding. So I had to attempt to build some understanding on how several standards work and their underlying math. As you are probably aware, JPEG standard allows you to encode continuous-tone images (photographs) with a typical reduction of 1:20 on the storage needs over other non-lossy methods. JPEG is based on the use of the Discrete Cosine Transform (DCT) that [basically] translates image spatial information to the frequency domain, where the weaker higher-frequency components can be removed without that being too noticeable.
JPEG 2000, on the other hand, is another image encoding standard based on the wavelet transform instead of DCT. Wavelets are families of functions that allow multirate analysis of signals. And here you will find the best tutorial on the subject I have found on the web. The end result is that wavelet-based image compression provides a smoother image than DC…

Kind of fixed

Image
After returning the CM Media 260 to the guys at Wikidi (that were quite nice with the return). I tried, again unsucessfully, to recycle an old Samsung DVD but unfortunately it was not large enough for all the stuff to fit in. So I went back to what I could find around and I bought, for the second time from the same seller, an Antler DM-318 case that seems to be a clone of Antec Minuet II case but with a distinct front plastic piece.

This first image shows the original inside of the box. After several attempts and given the case only accepts low-profile PCI cards I "borrowed" the dual PCI riser card from my Pundit case: It didn't work, as none of the two TV cards were detected. Anyway, it was impossible to fit that in. So I went to an extreme solution. I put a sheet of 3mm Depron on the bottom of the box. I removed everything and I started from scratch. The new photo shows the end result.

Unfortunately, right now everything is just laying on top of the Depron sheet without …

Back to square one

I've been told I need to buy riser cards as an add-on for the box I bought. Unfortunately the cost of the box is already well beyond the cost I was willing to spend on this particular item. I'm not 100% sure it is not my fault, but I did not get that impression when reading the manufacturers specifications. What I understood was that you may buy AGP or PCI-express riser cards. Now I guess any of them also comes with a double PCI riser card.

At any rate, I think I am going to recycle that old DVD player I no longer use and it is sitting in a cupboard and I am returning CM Media 260 box to the retailer. Let's see how this refurbishing project goes.

Buying a slim PC box is not that easy

Image
I've got my new box on Friday. The company I bought it from did a good job at delivering on time but all what happened next has been a mess.

Firstly, when I open the box I discover the color is black and not the silver I have ordered. Not good, I emailed my supplier and they reach me on the cellphone to apologise and to offer me a replacement but not sooner than next week. I thought about it and finally I decided I would be keeping the box after all, just for the sake of getting the system rebuilt over the weekend.

Saturday, early in the morning, I start the process of disassembling the old beige-box components of my PVR. When I am done (and a bit dirty as you know how the inside of a computer is), I unpack the CM Media 260 black box to start building the new system. Manufacturer's instructions ask you to disassemble almost everything first and so do I. I assemble the power supply (not without removing some screws from the power supply to have a smooth top surface). I then plac…

Copyright infringement and fair use

Apparently, lawyers at YouTube are not aware of what fair use is. I've just got a copyright infringement notice about the video I posted yesterday that was a 38 seconds excerpt of a >1500 seconds show. And that just because they were using my name, without my permission :-)

Ok. I do not think this issue deserves more brains or more of my time.

Buying a PC box for the living room

Image
It is not rocket science, you say. It is not, I do agree, but forget about getting it solved quickly once you do not want whatever they have to sell you. I just wanted to get an empty box that would fit in my TV table. My current TV computer uses a standard mid-tower beige-box. My only limitation was that I needed a box not taller than 14cm, but I had up to 50 cm width. It should be enough.... wrong!

The first box I bought was a new brand, Antler, a Poland-based company. The product was nice and well priced but I had a problem: It only accepted low-profile PCI cards and I needed one full size PCI slot. I went back to the web and I found this nice article. Thanks to them I could narrow down my choices to a couple of boxes only: Siverstone LC11 or CoolerMaster Media 260. The last one does not come with a power supply so it could be cheaper, or so I thought.

Unfortunately for CoolerMaster, the only partner they have in Spain that seems to sell retail is the Beep.es chain. It took them one …