Teensy and 32*32 led panel

I had to find a way to control a 32*32 led panel at a decent framerate. Unfortunately, the arduino theoretical limit was 7fps.. So I decided to use a teensy! Much more powerful, especially for serial-intensive task.

I came across Markus Lipp work, who just achieved that. Unfortunately, I couldn't figure out how to make his java app work.. So I adapted it to make it work with processing and it works just fine!

Basically, you need to download this bundle, wire the teensy according to what is written in the .ino file. Then, to test the wiring, run the test sketch (which displays a colour gradient).

All set? Then run the client sketch on the teensy, run the processing app and the panel will display the webcam flux! Easy! And if you want to display images or a video file, only a little modification in the processing file is needed...

Twitter API 1.1 and Processing 2.0b8

A few weeks ago we had a workshop about datavisualisation. Our group decided to use data from twitter so I had to write some little processing apps to make everything work. Here is what I learned.

Here is a sketch using both core and stream API. I dragged and dropped both files

Here is a sketch using both core and stream API. I dragged and dropped both files

First that site is the best site to get you started, mainly on how to get you Oauth codes. The sketch they wrote run quite well on Processing 2.0b8. The only thing is that installing twitter4J really is a pain. My advice would be to drag and drop directly the files you need into your sketch. It will create a code folder inside so then everything runs great!

You will find on Codasign a very good resource for searching and writing tweets from processing. But I was missing two things: how to use the stream API and how to display geolocated tweets on a map.

Basically, to make a streaming search, you need to create a twitterstream object, connect it to twitter, add a listener object and initialize it according to the keywords you want to search. Here is an exemple which takes two keywords and display tweets containing them in real time. Basically a googlefight on twitter!

Capture d’écran 2013-12-23 à 11.56.26.png

So now how about displaying geolocation. Getting the data is just a matter of testing wether or not the .getGeoLocation() is null and saving the data. Displaying it is a little more tricky. I found a part of code which helped me, unfortunately the processing website seems to be down and I can't find who wrote it. Anyway, I didn't!  Basically it transforms angular coordinates into euclidian coordinates and displays points on a map. The trouble is to find a perfect map, because there are a lot of different way of drawing our planet! In the exemple, I found one that kind of worked and made some adjustement.

Capture d’écran 2013-12-23 à 12.07.02.png

You can download that here! You will find out that there is much less geolocated tweet than normal tweet.