Category Archives: misc

Social networks integration test

It’s been a while since I’ve posted anything in my blog so many of you might’ve thought that I’ve abandoned it. Well, on the contrary, I decided to put a little more life in it, so I will be posting way more tech tips here. And, since apparently there’s no other way, I’ve set up social integration for this blog. For now – only twitter and vkontakte. This is basically a test post to see if everything works as expected.

Do not expect me to answer any friend request/private message/retweet whatsoever. If you really want to contact me – email is still the best option. Why? Because it took 5 minutes since registration on vk for first spammers to start doing their dirty work: .

Continue reading Social networks integration test

rf24boot: A universal over-the-air bootloader for all those uCs

Apparently I’ve come up to a point, when I want to do firmware upgrades for my home automation ‘over-the-air’. Since I’m using nRF24L01 dongles, I decided to write a bootloader for that.
While my pet antares project is slowly progressing towards the 0.2-rc2 release (honestly, really slowly), I’ve added the nice and shiny RF24 library (A port of maniacbug’s arduino library to pure C with no arduino dependences) to interface with nrf24L01 2.4Ghz dongles. I also fixed a few nasty race conditions out there on the way, but those are totally a different story.
So, what’s inside:

snapshot15
Continue reading rf24boot: A universal over-the-air bootloader for all those uCs

Creating .libs for kicad/eeschema semiautomatically

Well, everyone has to eventually make one. Since we have a cool online utility from C. Rohrbacher http://kicad.rohrbacher.net/quicklib.php This is quite simple. Just fill in all the pins, orient them and you are ready to go…
But if there are over 200 pins,this is getting tiresome. When I was making a lib for at91rm9200 I got tired at 30th pin. And there are 208 of them and it’s quite easy to screw up… So I got a nice idea. Unfortunately, I didn’t find C. Rohrbacher’s email on his site, as well as I saw no sources of the utility. So, it was time for a hackish solution.

We’ll need:

bash (Oh, yeah!)
xdotool
okular (Any other PDF viewr thatcan select text will do)

Step one.
Open the datasheet, find the pin list, select the pins:

Step two.
Copypaste them into a blank file. They should be strictly ordered

Step three
Now a little black magic. Save the following bash script somewhere:

#!/bin/bash
write_pin()
{
xdotool type "$1"
xdotool key Tab Tab Tab Tab Tab Tab
}
 
if [ $# -lt 1 ]; then
  echo "Usage: fill-pins filename"
  exit
fi
 
echo "Starting in 5 seconds..."
sleep 5
 
cat $1|while read line; do
  write_pin "$line"
done

chmod+x, And give it the file with pins you’ve madeearlier. You have 5 seconds to open the browser on page withpins and select PIN1.
The script will do everything by itself. Just relax – it looks pretty funny

And by the way, kill all instances of skype, icq, kopete, irc – these things tend to steal focus from the browser and screw thing up.

Q&D air conditioner (2.5 hrs to make one!)

It’s damn hot in Russia now. no… Well, it’s HOT AS HELL HERE.
This weekend sitting in my country house with no air conditioner there, I got finally just a bit too sick of it. Besides the heat the smoke from those damned fires is always around. (see photos under the cut)
Freaking smoke!

Anyways, I got tired of my brain throttling 4 out 5 clock cycles due to overheat, I decided it’s time for some hacking =). So I loaded some water into the fridge and while it was slowly turning to ice…


The setup is simple. I got two buckets. The smaller one I used as the water tank. I later added ice to the water. the bigger – as the main chamber. The pump (some old junk I found lying around) pumps the water up, and inside the big bucket it is sprinkled into small particles. I cooler fan I ripped of an old PC power supply pushes the air through this watery chamber. The resulting air is cool, and the smell of smoke&ash is finally gone. It took this baby about 10 minutes to clean the air in my room so that my brain began to function normally. Besides it cooled the air from 34 (Celsius) to about 30, till I ran out of ice.
I guess, that if this heat goes on I will have to make something more powerful. It’s far better, than sitting in the basement all day… And more fun than buying a ready to use solution.
Here goes the video of the rig.

P.S. This is not the worst case of smoke you might see here. Back in the city it is a real ‘gasenvagen’ and even a real air conditioner doesn’t help.