Dec 03

Open letter to Professor Hawking

Dear Professor Hawking:

I am writing you after I read in BBC news (http://www.bbc.co.uk/news/technology-30290540) that you think that Artificial Intelligence (AI) could “spell the end of human race”. I admire your work, you are a brilliant theoretical physicist that have brought light to black holes and other mysteries of the universe, and I admire you because you explain it in your books so even children (I was 14 when I read your “Universe in a nutshell”) can understand that. So I won’t judge your ideas as a theoretical physicist, but let me (I just have a Masters degree in Computer Science with a Major on Artificial Intelligence) share with you my ideas.

Why are you so afraid of real AI? It seems that you fear the consequences of “creating something that can surpass humans”. Well, Professor, we’ve been doing that all our history. Since Archimedes (or whoever it was) invented the pulley, humans were surpassed in strength by a rope and a wheel. Since Gutenberg invented the printing press, humans were surpassed in speed of writing. Since the car was invented, humans have been able to travel faster (and doctors predicted by that time that humans would die if they moved faster than 20 mph). Since the internet was invented, humans have been surpassed in information sharing and storage.

Professor, all this inventions made our lives better. They made our lives easier. You can actually communicate, go from one place to another and develop your theories just because those inventions I talked about are working for you, right now.Professor Hawking

AI will be just another tool for humans that make our live better. I understand you are scared, because for the first time an invention will develop exponentially in the moment it can improve itself. But, isn’t that great? Imagine something that can solve our environmental problems. Something that can show us how to feed all the mankind without killing the Earth. Something that can create new materials that will allow us to travel faster. Something that can find a cure for our worst illnesses. Something that will work for us, giving us time to spend with the people we love, and really enjoy our lives.

It is true. It is scary thinking about not working. But that’s the future anyway, and it won’t mean we will live worse. We will have time to evolve mankind to the next step, which is far beyond what we can imagine now. It is scary that a machine will be able to solve mathematical problems you’ve been trying to solve for decades and it will show you what is there inside a black hole, which is what you’ve been pursuing for so long.

No Professor… the machines won’t kill us, because AI does not have feelings. It has no anger. It is not selfish. It will just improve itself and our lives.

So please, stop scaring people with apocalyptic tales based on Hollywood films. Focus on your maths, and let us, computer scientists, improve mankind through tools, as we’ve been doing since we could light a fire.

Roberto Barbero

MSc Computer Science (Artificial Intelligence)

Oct 27

Raising (well, measuring) the Temperature

The Raspberry Pi has lots of amazing things (a great support community, the price, the size, …) but what really made me think about getting one is the GPIO, this is the number of pins available to connect the Raspberry Pi with the world.

Immediately came to my mind the idea of playing with it to build a home automation project. From controlling the lights, the level of the rainwater deposit, a basic alarm system… even the heating!!! A quick search over the internet showed thousands of results… I am not the fist one to think about it, so great news, lots of documentation and experiences available to learn.

I wanted to start with the heating project with the idea of programming and also controlling it over the internet. First of all, I need to know what the current temperature is in the house. I have two thermostats already installed (that I will hack in the near future). One is downstairs, in the living room and the second is upstairs in the main bedroom, so I can control two different zones of the house.

I bought from ModMyPi (excellent customer service, by the way) three temperature sensors, one for each floor plus a third one that I would use to measure outdoor temperatures. As soon as they arrived, following the instructions from the tutorial at ModMyPi I had up and running my own little thermostat. I wanted to know if the three would have any deviation sensing temperature, so I tried to connect the three of them in pararell as suggested in the tutorial. I rewrote the python program and the differences between the three were less than 0.05 Celsius.

RPi + Temp sensor

The next step was to place one sensor on each room I wanted to monitor. There is no way of persuading my partner of having a cable crossing half of the house from the living room to my office to wire one of the sensors there, so here comes another of the great things about the Raspberry Pi: price… and as the Spanish government used to say before the crisis, “why buy one if for twice the price you can have two?”… so I used a second Raspberry Pi in the living room to attach the sensor there (I have planned more tasks for this RPi, I’ll write about it in other post).

 

Outdoor temp sensor

The RPi upstairs has one sensor directly connected to measure the indoor temperature and also using a cable I have connected the third sensor (which has been placed inside a silicone sealed container to prevent it from becoming wet in the lovely London weather).

Finished the hardware part, the software was easy following the tutorials from ModMyPi as a base. I want the RPi placed at my office to be “the brain” of all the home automation project, so the rest of the RPis will send data (temperature, motion, open doors, …) to the main RPi, which will have UDP servers listening, waiting for events and triggering actions based on that events.

This is the code I use for the “client” side. The Python program reads the temperature from the sensor and sends it to the central RPi using UDP. The client runs every 10 minutes and it’s launched by the cron. The central RPi has the “server” side, listening on port 3000, waiting for the clients to send their temperature measurements. There is a third piece of code that writes in a table of a mysql database the temperatures every 10 minutes. I am a beginner in Python, so I guess the code is far from “pythonian”…

It was easy to write a php piece of code and using Google charts I can now see what is the current temperature and also historic data. The next step will be to hack the thermostats and let the RPi control the heating based on the goal temperature.

Temp graphs

Oct 17

Let’s get started…

I work as a Solution Architect in a big software company. It’s a great job… but somehow I was missing something… When I studied Computer Science (actually it’s Computing Engineering in my case) I thought I would be doing later a different thing that what I am doing right now…

In the uni we studied the theory behind the computer. And I really enjoyed it, because it was the natural thing to do after playing when I was a child with all different types of electronics (and receiving a couple of electric shocks)…

My father gave me one year for Christmas one of these:

Electro L

And I found it amazing, I don’t know how many hours did I spend building circuits… So the next year I got this:

Scatron

Soon I started to collect motors, transformers… Combining them with Lego… Serious fun in a sometimes very untidy bedroom that my mum did not like.

And now, it’s time to go back to the origins… I enjoy being a Solution Architect, but I miss playing with electronics. And then I discovered the Raspberry Pi project. A computer the size of a credit card, cheap and most importantly, with a very easy way to extend and connect to the external world.

A few years ago, that was just called automation or control. Today, it’s the Internet of Things, and immediately crossed to my mind to start a home automation project. Why not control the lights, the heating, who gets in, the shopping list, the watering of the garden…

So this blog starts to show how this project goes… and hopefully inspire others to do similar things, as I got inspired by my parents when I was a child… Because kids… we need engineers to build our future… But as important as that, those engineers should have loads of fun while building it ;)