Posts

Spiro curves

Image
I've never been a fan of Bézier curves , but sometimes they are useful. Maybe my main complaint is acknowledging the fact that I've been incapable of getting a curve just right on the first attempt in any vector editing software. Maybe it is just me. So when I saw that Inkscape was adding support for a new type of curve I have never heard of before I started to pay attention. Of course this is old news for some of you, but I've been busy with other things and I have not checked the development version of Inkscape for quite a while (maybe a sign that I'm quite happy with 0.46 version). The thing is that Mr. Levien was smart enough to develop an alternative to Bezier curves and kind enough to grant a free license of his patented technology to GPL software. Thanks to this Inkscape can brag of supporting a new type of curve not available on commercial software like Illustrator. A library is available on Sourceforge too. But it won't be fair to the effort of Inkscape ...

2D barcode decoding

Image
Barcodes have been growing to pack higher data density. 2D barcodes can pack more data than older 1D codes. Many cellphones can decode barcodes as the are equipped with a camera good enough for the task. There is a cool project that offers code for doing that with a variety of phones, including iPhone and Android. Unfortunately it does not seem to work with my Nokia E71 phone (it has to be some kind of curse, as the built-in barcode software that came with the phone does not work either). However I still can use the phone to take a picture of the codes I'm interested on to have them decoded on-line. You can try this form to decode a file with a picture of a barcode. An alternative to using the cellphone for decoding the barcodes on-line (that can be expensive depending on your data plan) is to download those images to your PC and to use a simple script to get them decoded. I used curl tool for doing that as it has HTTP POST capabilities. It worked great.

ICH9 sound problem on resume

Image
Last summer I renewed my two main desktop computers. I was looking for something compact but easily upgradeable. Not very expensive and reliable. I've got good experiences in the past with ASUS barebones, so I went for this one . All but a small detail have worked like a charm since day one. I was amazed to see see that even suspend worked nicely with Ubuntu 8.04. But then I realized the system sound was gone when waking up from suspend. And it seemed the only way to get it back was to reboot the system. Several forums reported the possibility of adding some parameters to the sound driver module so it will reload appropriately when resuming. Unfortunately the two first hours of attempts were unsuccessful and I decided I could live without it. However, days later I've found another post where what it is suggested worked for me too: add these lines to /etc/modprobe.d/alsa-base options snd-hda-intel model=3stack-dig options snd-hda-intel enable_msi=1 options snd-hda-intel single_...

MacBook Superdrive problem

Image
We all love the MacBook at home. For a while we made no use of the built-in Superdrive. However, I noticed that the rubber feet did not work well when I put the laptop on a table: It slided easily while used. I thought it was a poor-design detail, maybe it was not flat enough. A few days after buying the laptop, early this year, I saw the advertising of the new iLife'09. I thought it might be included with my laptop but it was not. A couple of email messages from customer support did not much to enlighten me on how to get my copy for free. A friend of mine showed me I could be eligible for an upgrade for a small shipping fee and so I buy it. Once I've got the iLife DVD is when the problem struck me hard: The MacBook refused consistently accepting the disc. I was not even sure whether another disc might be stuck inside or not. Several tricks to get system to eject the disc failed but I was almost sure the unit was empty. I thought it was a real shame that a brand new laptop was ...

iLife'09: Really worth it

Image
I've just got my upgrade from Apple. Although I bought a MacBook early this year it did come with iLife'08 software. After watching some of the features about the new version I asked Apple for my own copy, that was not free but around $10 of shipping cost. Software install took a long time (more than 30 minutes) and iPhoto browsing more than ten thousand photos needed more than two hours. But after that it was really fun to use the new "Faces" feature. Though not perfect it does an Ok job of detecting people's faces on your photos. On the musical side, the new GarageBand includes a cool feature with music lessons you can download (some are free and some are for a fee). If you have a MIDI/USB dongle you can attach a music keyboard (our cheap eBay dongle worked nicely). iMovie seems to have some advantages too, but iPhoto and GarageBand new features made the switch for us really worth it, even if you have to pay the full price. I've found the new photo slidesho...

Avoid password after suspend on Ubuntu

Image
As it use to happen, once you search the net for something you realize other people have done it before and hopefully have written about the solution to the same problem too. That has been the case when I was working about a way of suppressing a reasonable behavior of Ubuntu OS on my laptop: When it is wake up from suspend, the user is asked for the password. It is a well thought out security feature but it was annoying for me. I use the laptop mostly while watching TV on my coach (ideal for skipping the ads). However I do not have a backlit keyboard (I envy my wife's MacBook which does). So typing a password with not much light in the room is error prone. Fortunately it was easy once you find the way of changing the system configuration. Here it is .

Funnel IO

Image
I've just learned of a very interesting sensor platform . It combines an Arduino, and Xbee wireless module and a Lithium polymer battery charger. Battery maybe recharged by USB. Standard Li-Po batteries are almost 1000mAh. It can also be wirelessly reprogrammed , which is cool. Combined with power management it could achieve very long lifetime on a single charge.

On-line calculator

Image
Sometimes you need a calculator to use in the classroom. Maybe you need to solve a 2nd degree equation or you need to know the binary representation of a decimal numbers. I'm sure you can do math, but I've found this online calculator very very useful.

P2P DIY

Image
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

Image
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

Image
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

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

Does Google blur phone numbers on Street View?

Image
I was looking for a business telephone of a tyre repair garage. Unfortunately the small shop might not be paying to get an ad on yellow pages and I could not find it. Next step was to try to find it on Google Maps Street View, as I knew there were lots of text on the garage walls. Unfortunately, though I could find that street photos, the photos blurred the last group of seven numbers. Though I've searched around, it does not seem to be an error: Apparentely the software does blur not only faces but also license plates. I wonder wheter these numbers on the wall might be considered license plate numbers. At any rate I was lucky enoughthat one of the angles of the scene did not blur the numbers. Hopefully we'll get an appointment to get our punctured tyre repaired soon.

Some power benchmarks

Image
After some time willing to do this I've found a moment to do some measurements. Firstly, I've removed Arduino Mini Pro power led resistor to see how much current was needed for the device in power-down mode: It's just 155uA@3V3, even lower if you go down to just 3Volts. The Mini needed 5mA for normal operation (with no output loaded). The other component I was interested on testing together was Digi's XBee module. While XBee needs 50mA on operation, using SM=1 (Hibernate mode) the power goes down to 1.6uA when sleep mode is forced (by raising pin 9 to high). That all means that a basic wireless sensor node based on this components will use at least 55mA during ON periods and 0.16mA while SLEEP. That translates into about 4 hours of continuous operation from a 220mAh 3V button cell. However, if node is powered up only 3 seconds every 5 minutes, then the same battery should last around 13 days. This seems to start looking ok for my sensor network project.
Image
A recent project required the use of an industrial computer, able to work within a wide range of temperatures. Interaction with other systems would happen by serial and Ethernet ports. I've used devices manufactured by Moxa , running uClinux (a slim version of Linux that can run in systems without an MMU, like some ARM processors). Development is done using a GNU C cross-compiler and almost all the time development uses familiar tools. My systems came from factory with an old version of the kernel I had to upgrade, but once upgraded they are working rock solid. Manufacturer support was also valuable whenever a feature was expected but missing on the uClinux distribution (i.e. no ?time functions on busybox-based find).

Enterprise WPA troubles

Image
Two gadgets we've got recently refused to access the university wireless network. The reason is that WPA with an EPA-PEAP autentication server is used on UPV campus. The ASUS eeePC that comes with Xandros Linux does not support that. Alternatively I could use the eeePC built-in VPN to connect to a secondary wireless network, but again, that software did not work either. The Nokia E71 cellphone does support WPA Enterprise, but contrary to other wifi setup that can be done on the fly, the so called WPA Enterprise is hidden down there in the system configuration menus. The solution I took for the eeePC was quite radical as I installed eeeXubuntu . There is a special Xubuntu version that worked for me. You create a boot image on a USB flash dish to get it installed on the eeePC. One word of warning though: I you accept to install system updates, each new kernel update will break the Atheros wireless driver (it can be rebuilt later, but it's a manual process). The solution for E71 w...

Low power arduino

Image
I've bought recently a new Arduino Pro Mini. I was mostly interested on what the minimum power consumption might be when powering it at 3.3 volts. The average current was 5 mA with pin 13 led off. But what it is most interesting is that sleep mode current goes down to 400 microamps (and this is still keeping the red led on). As the red led resistor is 10k I guess the sleep current will go to almost nothing once I remove the red led resistor. That is a very interesting value if you're worried about power consumption for sensor network applications. A CR2032 will last for more than 500 hours at 0.4 mA!

Stippling fun

Image
Have you ever wondered how to achieve a monochome representation of an image using just dots? This is what stippling is all about. The next question is how this can be done. You might have seen Wall Street Journal hedcuts and they look great, but they are produced by a human artist. Machine-based approaches like dithering and half-toning work well too, but they are not quite the same as the above. Google led me to the nice work of Adrian Secord, with the not so suggestive name of Weighted Voronoi Stippling. Author provided binaries and source code too. Unfortunately it did not work for me. But after contacting the author, who provided me an updated binary that ran on my Leopard iMac. You have a sample image of the input (right) and output (left). I want to thank Adrian for being so kind of including my suggestion of adding SVG output to his code (and for making his project's code available).

Fixing Hardy audio problem with Pulseaudio

One of the few problems I've got with Hardy (Ubuntu 8.04) has been a weird audio problem . It looks like Flash plugin and any other application that plays audio do not like each other. So I have had to close Firefox completely to get audio working again in, let's say Rythmbox. My audio device is Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02) I research the problem a bit and I've found three pieces of advice: 1) Install libflashsupport (which did not fix my problem) 2) Restart pulseaudio (that might be done right by killall -9 pulseaudio) or kill gnome-power-manager 3) As suggested here : asoundconf set-pulseaudio (this one worked for me) Now I can play a song on Rythmbox while viewing (and listening) a video on youtube. Something it was possible on previous versions.

Inkjet vs Laser

Image
Have you ever been interested on the output quality of both Inkjet and Laser printers? I can see many comments on the net about the cost of running the two types of printers. Someone mentioned that HP is making $10 billion dollars a year selling inkjet cartridges (this seems like a lot of money). I am not worried about the printers' running cost at the moment. A recent project required me to study a few pages of a document. On a closer inspection I realized they were not printed on the same printer. While laser printed documents create well-defined contours, inkjet printers seem to create small ink spikes on line contour (as you can see on this entry photo). Light reflection properties are also different, inkjet black being non-reflective but laser printed black being slighty reflective. I'm not complaining about any type of printers as for regular use I think both provide good-enough output. However, it seems it is not difficult to tell which printer you are using just looking...