Archive for the ‘Sem categoria’ Category


Thursday, November 10th, 2011

Yes, I know I haven’t written on this blog as much as I’d like to, but things are starting to normalize.

Having a little newborn baby at home and trying to finish my house, along with a very intense work schedule, did not contribute to my free time at all. My personal projects have been on hold for the past year or so, but I think things will pick up from now on. The kid is already 6 months old, and by the looks of it he’ll quickly grow into a big boy (needing less time with diapers, sleep, etc). I love being with my kids, so this is invested time; I’m sure it will pay off in the long term.

Codebits V will probably mark my return to activity.

Codebits V – ignition!

Thursday, November 10th, 2011

I’m on my Alfa Pendular train, heading to the Parque das Nações in Lisboa, for the Codebits V!

If you’re there, do look me up on the premises! 🙂

To infinity and beyond!

Wednesday, June 1st, 2011

Ever since I was a kid I’ve wanted to send a probe of mine into near space. When I grew up and learned a bit more about the laws the govern the universe (at least the ones we can come up with nowadays), I realized it was not an easy task. But I didn’t want to send a full-fledged, 3-year-of-development, 1.5 ton, 3 meter tall probe into space, with the highest tech equipment on board. I just wanted a small probe, with simple, cheap sensors, a camera and little else.

A group of very clever people actually achieved this recentely: the SpaceBits project. Go there and amaze yourself.

Now, the idea of using a high altitute baloon is great, one that I also had myself back then, but not as the only means of transport. My design was based on vessel with propulsion, albeit a very weak one (to be as light as possible). The baloon rises the vessel to a certain height before bursting; the idea was to use the propulsion to go further than the baloon alone could go. The strategy was to use the propulsion a few seconds before the baloon burst to alleviate some effective weight and accelerate the set. The vessel would apply just enough power to even out it’s own wheight, or a bit more, so that the baloon would accelerate. Immediately after the baloon burst, the vessel would apply full propulsion until the power ran out. After that, it would fall again to Earth.

The fall was not caotic; the vessel could manouver during the descent, so that it could crash into a more-or-less predicted place (preferably some water, hehe). I wanted it to have a small parachute, but weight would certainly not allow it (and it’s associated firing mecanism).

I even had a sketch of the vessel made; it had a rocket-like shell, with stabilizer fins, and lateral duct-fan assemblies for propulsion. The body/fins would move to steer the vessel. I knew the fans would only work up to a certain height, but I never got to know what that limit was… if I’m thinking correctly, once the air becomes more and more rarified, the fans produce less and less impulsion; even assuming an infinte power supply, there would be a point were the impulse would equal gravity, and the vessel would move no further.

In terms of power, the idea was for it to be totally electric, with four power supplies: propulsion engines, ascent and descent control motion, main systems, and a very small backup for the main systems.

In terms of sensors, I never got to think too much about it, just some simple temperature, pressure, light, oxygen, altitude, speed, etc. It would have a camera facing forwards, GPS for positioning, and a radio telemetry and control system connected to a land-based application.

Back then, this would obviously all be done with an Amiga! 🙂 Seriously, this was a project I would really like to build one day; electronics are much cheaper now, we have access to some pretty advanced microcontrollers and radio devices, and development (both hardware and software) has never been so much fun! 🙂

Idiotices estatais

Wednesday, May 25th, 2011

O estado dá um incentivo na compra de painéis solares para aquecimento de água de uma habitação. Parece-me boa ideia. Aliás, tão boa que equipei a minha casa nova com um sistema solar poderoso, apoiado por uma caldeira a lenha. Um sistema com um ciclo de carbono perfeito em termos de consumos. No entanto, o estado não me deixa aceder ao incentivo! Parece que comprei os painéis durante a construção da casa, enquanto esta ainda não estava registada (porque não podia, duh)… pelo que não posso declarar a compra no IRS para ter o incentivo. 😮

Absurdo. Como se já não bastasse o incentivo ser uma percentagem do valor investido, mas com um limite ridículo (777€ se não me engano). Faz-me lembrar os incentivos para a microgeração, com todos os limites impostos, tanto em termos de registo de instalações como nos preços pagos por KWh. Na prática, é tudo uma fantochada. Como muitas coisas anunciadas neste país.

Enfim! 😛

Time scavenging

Tuesday, April 5th, 2011

You know when you’re playing this great action game that has you doing some amazing stuff, but you have limited time to accomplish your mission? Once in a while, you come against these beautiful clocks just floating there in the air… up for grabs. You pick one up and presto! There you go! Another 2 minutes allowance to finish that level.

Since I don’t seem to have time for almost anything these days, I *so* wish I could find those floating clocks around here!…

Fun with the Arduino Ethernet Shield

Wednesday, February 23rd, 2011

I’ve been using the Arduino platform as a means to develop some of the devices I’ve been needing, from the most simple (my daughter’s color-changing nightlight) to the most complex (a stand-alone, fault-tolerant, inexpensive telemetrics system). Somewhere along the way, the Ethernet shield come into the picture. To be a part of my designs, I had to tweak a few things on the shield:

* The reset is not dependable; many times the shield would simply not startup as expected, and the Arduino lost connection to the outside World. Solution: I lifted the shield’s reset pin (so that it does not enter it’s connector on the Arduino) and connected pin 8 to the shield’s reset line. Like this I can programmatically reset the shield on every boot, and every time I loose a connection to the Internet.

int rebootEthShield()
Serial.println("Rebooting ethernet shield...");
pinMode(8, OUTPUT);
digitalWrite(8, HIGH);
digitalWrite(8, LOW);
digitalWrite(8, HIGH);

Ethernet.begin(mac, ip, gateway, netmask);

You can obviously choose any other output pin.

* I test the Internet connection by connecting to a server on the outside World (i.e. my server). But since this is hardly a static World, and IPs are apparently volatile entities, I needed to have a means to change the test IP. The problem is, the Arduino does not really support object instantiation. So, you create a client socket like so:

byte cl[] = { 192, 168, 1, 1 };
Client clienteLink(cl, 80);

And that’s it. You can no longer change de IP throughout execution. 🙁 To be able to do it, I had to add a method to the Client class: reconfigure(). On the Client.h file, add:

void reconfigure(uint8_t *, uint16_t);

On the Client.cpp file, add:

void Client::reconfigure(uint8_t *ip, uint16_t port) {
_ip = ip;
_port = port;
_sock = MAX_SOCK_NUM;

This is on Arduino Alpha 022 (older versions need slightly different code, but it’s very simple).

Now, all I need to do is close the Client before issuing a reconfigure(). Then I can try to connect to another server. There may be a simpler way to do this, but I couldn’t find it. If you do, please post! 🙂

Have fun!

I’m all green today…

Friday, November 12th, 2010

… and leapy and croacky!

Codebits is amazing!

Riding the stream… to Codebits!

Thursday, November 11th, 2010

I’m aboard an Alpha Pendular train, heading for the Pavilhão Atlântico, to attend Codebits!

I’m taking some clothing, some retro gear, my laptop and a lot of will to learn, teach and have fun! All this while listening to “Riding the Stream” from Bjorn Linne. It’s from one of my favourite games of the time: Alien Breed 3D. The atmosphere was amazing, although the FPS were not…

See you at Codebits! 🙂

I’ve always been a Rebol, anyway

Thursday, September 30th, 2010

Some years ago, when I went to University, I preached to anyone that would listen about Java’s greatest virtues. I was a true Java evangelist, but people mocked me and said I was nuts. I can still hear myself back then:

“But it’s an object oriented language, WORA! The platform is one of it’s strenghs, too! Threads and stuff! Imagine the possibilities!”

“You can develop and test in any operating system! Development is free, you don’t have to splash on an SDK/IDE/whatever!”

“It’s the knees bees, I’m telling you! Look!”

And people would laugh. Out loud.

A few years later I’ve finished my degree, and Java is all the rage, the Electronics and Telecommunications department improves my degree with Java as a discipline, everyone is on it. By then, I was happily developing my multithreaded, client-server, MVC, near-real-time, graphics-intensive, dedicated industrial applications in Java. Now that “Java is everywhere”, I’m looking for alternatives.

Why? I can’t really tell. On one hand, Java has been very kind to me, giving me a powerfull common platform on the Mac, Windows and Linux. And yes, I’ve had to deploy on all of them. Java gives me the simplicity I crave for in application deployment. There are lots and lots of good libraries around for you to leverage. And I must confess that the object orientation and the garbage collection really spoiled me.

But on the other hand, I’ve got a couple of issues I still can’t identify. Nothing even remotely serious, but the JVM has failed on me in native code twice, and there are some problems drawing graphics (glitches) on certain machines. Graphical performance is also a bit unpredictable from machine to machine (I’m talking Windows here, on the Mac it’s quite good and predictable and on Linux it’s, well, always slow-ish). Also, some really simple tasks take waaaaay too much code, care and study in Java, because it really is a general-purpose platform.

While not letting go of Java (I still love the platform nonetheless), I’m in the process of learning new stuff. Objective-C is way cool, I like it a lot, but as a platform it’s confined to the Mac/iPhone. So I’m getting to grips with what I think is the next big thing: Rebol. I took a quick 15min look, and it seems great!

The other platform, although not as revolutionary, is great for graphics stuff: BlitzMax.

I always was a fan of Mr. Carl Sassenrath and Mr. Mark Sibly ever since I was a kid in my Amiga times. Their evolution and art is an inspiration!

Treading new ground here, and it’s FUN!

Codebits 2010

Friday, September 10th, 2010

Aí vem ela! Os anos passados nunca consegui estar na Codebits os três dias (por limitações de trabalho), mas este ano não vou deixar que isso aconteça; vou mesmo do início ao fim!

Desde que comecei e ir às Minho Campus Party que fiquei com o bichinho destes eventos. Achei a MCP bastante orientada aos jogos (embora tivesse alguma programação e criatividade lá no meio), enquanto a Codebits me parece quase completamente orientada a programação/tecnologia (o que eu prefiro).

Como a organização pediu para levarmos retrocomputers, talvez este ano façam uns torneios de retrogaming… vou ver se levo um Amiga preparado com Sensible Soccer, Dynablaster, Gravity Force, Hired Guns e outros jogos multiplayer a ver se arranjo oponentes! 😀

Bora lá! 😉