What do you get when you mix a Swedish House Mafia‘s music video, an ad for Absolut Vodka and a futuristic vision of entertaining races? This visually-stunning video, that’s what:

Published by António Lopes on June 28, 2012

Since I need to do some serious work on the Arduino platform in the near future, I decided to have a look at all the material I had lying around to make sure I have everything I need for my next project. However, I discovered a particular object that I didn’t know what it was.

Light-depended resistor

A light-dependent resistor

I quickly took a picture of it and shared on Twitter (which is actually much better than Google for this kind of stuff) and, right away, several people replied pointing out that the mysterious object was in fact a photoresistor, or a light-dependent resistor.

Basically, this small sensor outputs its sensitivity to light and in this case, it produces a value between 0 (in very dark places) and 1023 (close to the sun) that can be read by an Arduino board through one of the analog input pins.

Since I also had a small buzzer that I could connect to the Arduino, the next step became obvious: to build a cheap-ass theremin. Before lunch, preferably… And it was indeed quite easy to build and program. Here’s the schematic for the whole thing:

Theremin schematic

The schematic for the cheap-ass home-made theremin

Basically, you need: a buzzer, a photoresistor, an Arduino board (pictured here is the Ethernet shield since the Arduino I used was the Ethernet variant), a couple of resistors, a mini-breadboard and some wires for the connections. In case you’re wondering how to do this kind of schematics, I used Fritzing.

As for the code, it’s also quite simple: you just need to get the photoresistor sensor value from the chosen analog input pin (in this case, A0) – a value between 0 and 1023 (awesome tutorial here) – and convert it to a frequency, ranging from 0 to 2500Hz (I chose this particular frequency because it sounded loud enough but I’m not sure how high it can go) and send it to the digital output pin (in this case, 4). The buzzing part is a bit trickier but this tutorial explains it quite well.

Here’s the complete code:


int prPin = 0; // Pin where the photo resistor is connected to
int prReading; // The analog reading from the photoresistor
int buzzerPin = 4; // Connect Buzzer to Pin 4
long buzzerFreq; // The frequency to buzz the buzzer
// You can experiment with these values: long BUZZ_FREQ_MAX = 2500; // Maximum frequency for the buzzer
long PR_MAX = 1023; // Maximum value for the photoresistor

void setup() {     pinMode(buzzerPin, OUTPUT); // set a pin for buzzer output
}

void loop() {
    prReading = analogRead(prPin); // Values 0-1023
    buzzerFreq = (prReading * BUZZ_FREQ_MAX) / PR_MAX;
    buzz(buzzerPin, buzzerFreq, 10);
}

void buzz(int targetPin, long frequency, long length) {
    long delayValue = 1000000/frequency/2;
    long numCycles = frequency * length/ 1000;
    for (long i=0; i < numCycles; i++){
        digitalWrite(targetPin,HIGH);
        delayMicroseconds(delayValue);
        digitalWrite(targetPin,LOW);
        delayMicroseconds(delayValue);
    }
}

And here’s the video with a small demo:

[youtube http://www.youtube.com/watch?v=iU0KcMpgIT4]

I know this is nothing like a real theremin, but considering the limited output sound that the buzzer can produce (and the ridiculous amount of time I spent with this – around 20 minutes), this is probably the best I can do with this stuff.

Published by António Lopes on June 27, 2012
Categories: Geek, News, Science, Technology, Videos

Remember Leap Motion, the awesome new device for gesture-based tracking that may be the beginning of a revolution in human-machine interaction? Well, a more detailed demo is now available and it still looks awesome. Check it out here.

Published by António Lopes on May 27, 2012

A few weeks ago, I was discussing with some colleagues what the next big thing in technology would be. As always, it’s very difficult to accurately predict anything in the technology world but I ventured in saying that human-machine interaction is where we have the most potential right now.

My point was based on the fact that the devices we have nowadays are more or less stuck on a simple evolution process that is (almost) nothing more than upgrading their specifications (a better display, a faster processor, etc…) but without actually adding anything innovative. Human-machine interaction is where I think there is more room for innovation right now. You can see those attempts in things like the Siri for the iPhone 4S and similar approaches on Android.

Now I’m glad to see that there are more people betting on this specific area of technology. Last week the world became acquainted with The Leap:

Superb demo and if the accuracy and speed of the device is half of what is showed in the video, this is going to be awesome.

Now, my colleague David did a post (in Portuguese) on these technologies and I have to say I was quite impressed by Touché:

The technology is still very new but the potential for touch-based applications is mind-blowing.

via sixhat

Published by António Lopes on May 14, 2012

If you follow this blog you’re no stranger to these futuristic ramblings about how the human race will use their technology to become (somewhat) immortal. But this particular view, in which the afterlife is depicted as some sort of a privatized service, is simply brilliant and shows exactly how the future can be so scary in terms of copyright content.

As the authors say: “the Singularity, ruined by lawyers”

see here via Artur Ventura

Published by António Lopes on March 5, 2012

This video is part of a visually-stunning series of videos based on Carl Sagan‘s texts on the humankind and space exploration. Do yourself a favor and watch these videos. They are surprisingly relaxing and awe-inspiring.

Published by António Lopes on March 2, 2012
Categories: Geek, Science, Technology, Videos

Exoskeletons are an old concept in science fiction literature and it is something that has always amazed me mainly because of the potential for extending the capabilities of a human person. But what amazes me the most is how something like this is only now becoming a reality:

via 1/0

Here’s a great and funny analysis (and alternative story) of the first episode of the Star Wars franchise that could have actually turned it into an interesting movie.

Categories: Random, Videos

Traveling through Chile and Patagonia is actually one of my dream voyages. And after seeing this video, my desire to do it just increased tenfold. This is travel video done right:

Thanks, Rechena.

Categories: Funny, Geek, Technology, Videos

Part of my job as a researcher is to attend conferences and to go through some painful presentations from people that have absolutely no idea on how to make their research interesting to other people that are not exactly as familiar to the subject as them.

The following presentation (that even has the corresponding paper for consultation) is obviously a caricature for those kind of presentations but I’m pretty sure that I’ve sit through some presentations from which I retained as much on the subject as on this one:

Via Wired