Cloudy (showers later)

Monday, April 4, 2011

Physical Gmail Notifier

So, looking for a job in France (which is a challenge) I needed a break and decided to look around in my 'box of electronic stuff' to see what I could build.

Found some arduino's and then, 6 red LED's. So, I figured I had to build something that counts using a six bit binary system.

Then I found This blog on how to make a physical gmail notifier, and really liked the idea, so I adapted the code, and fought with the plist file used (on macs, dunno how to do this on PC) to run the python script with a specified interval, and now it works!

So now, I have a little wooden block next to the mac, showing me how many unread e-mails I have.. which allows me to see if I have any, and if so, how many, from a distance. Can't do without that, obviously.

In case more people feel inspired, this is the code used on the arduino:
(mind you, I'm not a real good programmer, so it can probably be done easier, or better, but hey, this works for me)
int pinArray[] = {2, 3, 4, 5, 6, 7};
int nomailpin = 8;
int mail = LOW;
int val;
int outerloop;
int value;
int bit;
int innerloop;
int pinLoop;
int bitSetter;
int amount;
int mailcount;
int oldval;
int timer = 25;
int count = 0;

void setup()
{
Serial.begin(9600);
Serial.flush();
pinMode(nomailpin, OUTPUT);
for (pinLoop = 2; pinLoop < 7; pinLoop++)
{
pinMode(pinLoop, OUTPUT);
digitalWrite(pinLoop, LOW);
}
}

void loop()
{
if (Serial.available()) {
val = Serial.read();
Serial.println(val);
mailcount = val+1;
if (val != 0) {
if (val != oldval) {
change();
}
Serial.print("mail");
num_mails();
digitalWrite(nomailpin, LOW);
oldval = val;
}
else if (val == 0) {
for (pinLoop = 2; pinLoop < 7; pinLoop++) {
digitalWrite(pinLoop, LOW);
}
for (int j=0;j < 4;j++) {
digitalWrite(nomailpin, HIGH);
delay(100);
digitalWrite(nomailpin,LOW);
delay(100);
digitalWrite(nomailpin,HIGH);
delay(100);
digitalWrite(nomailpin,LOW);
delay(100);
}
digitalWrite(nomailpin, HIGH);
oldval = val;
}
}
}

void num_mails()
{
for (outerloop = 0; outerloop < mailcount; outerloop++){
bitSetter = outerloop;
for (innerloop = 2; innerloop < 10; innerloop++){
value = bitSetter / 2;
bit = bitSetter % 2;
if (bit == 1){ digitalWrite(innerloop, HIGH);}
if (bit == 0){ digitalWrite(innerloop, LOW);}
bitSetter = value;
}
}
}

void change()
{
for (int count=0;count<6;count++) {
digitalWrite(pinArray[count], HIGH);
delay(timer);
digitalWrite(pinArray[count], LOW);
delay(timer);
}
for (count=5;count>=0;count--) {
digitalWrite(pinArray[count], HIGH);
delay(timer);
digitalWrite(pinArray[count], LOW);
delay(timer);
}
}

This is the python code:

import serial, sys, feedparser

#Settings
USERNAME="YourEmail@gmail.com"
PASSWORD="YOURPASSWORD"
PROTO="https://"
SERVER="mail.google.com"
PATH="/mail/feed/atom"

SERIALPORT = "/dev/tty.usbserial-A7006vlT"

# Set up serial port
try:
ser = serial.Serial(SERIALPORT, 9600)
except serial.SerialException:
sys.exit()

newmails = int(feedparser.parse(PROTO + USERNAME + ":" + PASSWORD + "@" + SERVER + PATH)["feed"]["fullcount"])

# Output data to serial port
ser.write(chr(int(newmails)))

# Close serial port
ser.close()

Of course, you will have to put your username and password in the script, and change this : dev/tty.usbserial-A7006vlT for the address of your arduino (you can find that in the arduino software under Tools > Serial port).

Then, you need to put a .plist file in your Launchagents folder (in your Lib) containing this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.j4mie.check-gmail</string>
<key>OnDemand</key>

<true/>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python</string>
<string>/Users/yourusername/path/to/check-gmail.py</string>
</array>

<key>StartInterval</key>
<integer>60</integer>
</dict>
</plist>

Make sure to enter the correct path to both your python file, and your pyton interpreter.. it's often not just /usr/bin/python as in this file.. make sure you have the one you get when running python in your terminal.. that's the one you want to use..

So, when all this is done, you should be able to see the LED's (or whatever you build) show you your amount of unread mail every minute.. I made a little movie showing my finished notifier block:





Enjoy!

Friday, February 27, 2009

Changes, for that never changes

After my breakup with Martijn I started talking With Danny Grob, another schoolmate and friend, and we decided to work together!

So a new cooperation, and some new plans.

In short, this is the plan:

Physical representation of the raw materials used to generate the power used by the internet using those materials themselves, and allowing the viewer to 'feel' their impact on their direct environment. The user can alter the variables, and thus see what impact a particular action has.

A bit longer:

we are going to build an interactive installation, in which the raw materials needed to account for the power consumption of the internet is displayed by use of water, soil, gas and electricity. These materials will be incorporated in the installation themselves, and will be shown in what might appear to be a small power plant.

Furthermore, the visitor will be able to interact with the installation (which will derive it's data live from the internet) by changing certain values. What if we would all shut off our computers during the night instead of leaving torrents open? These altered values will be directly shown by the installation.

Everything to scale of course.

Another thing! (jippy!)
Martijn and me have been asked to install some older macs on the polytechnic school in Accra, Ghana, and teach the people there how to use them and the software installed on them. Great opportunity of course to visit another country (really excited about that!) but also a great project organized from within the HKU. A lot of old computers are thrown away just like that, but there are many people in other countries that might have really good used for them. I'm glad to be made part of this!
We will go there around the second week of May, and stay for a month to teach and get everything up and running.
We will be at the Polytechnic school itself, and I will of course keep you posted from there about our adventures.

Thursday, February 12, 2009

Networks

Since I started thinking more in my own lines of interest an idea popped up; what if I would consider the internet as being a neural network and make design decisions based on that premise?

I could construct devices that depict a certain state of the internet (and hence the world using it) by monitoring the use of words in the blogosphere. I.e. an object that allows you to see the degree of happiness or lack thereof felt by the people writing the blogs. By, for instance, monitoring the frequency of use of the words 'love' and 'hate'.

Problem that arises here; the use of the word 'hate' does not necessarily occur in a post that would have to be considered as 'negative'. One could construct a sentence; 'I am infinitely glad for the disappearance of all the hate that surrounded me lately' Which would be looked upon as negative by the just introduced system, while it obviously is not.

But problems I like.
For now I'll pursue this line of thought and see where it brings me.

For the 'goede orde', as we Dutch say, a little quote:

"On ne me fait pas marcher moi" (Cravan, Arthur)

Which is absolutely not true.

Tuesday, February 10, 2009

Wieder zu hause.

Zurück von einem schönen Wochenende in Deutschland, und jetzt ist es zeit fur etwas arbeid!

As one could read in the previous post, we went to the ZKM in Karlsruhe, where we visited the exposition 'Medium religion' and had dinner with a student of architecture from France. The dinner was very good (accompanied by nice dunkel weizen (you gotta love the contradiction)), the museum was ok.

After spending quite some time there, I was notified of the fact that the museum also features a giant section of interactive installations.. which I was able to glimpse at for just 5 minutes before they closed. A lesson was learned; always check what's available.

The exposition on religion in the media was interesting, but, for me, not much more than that. Next to some good imagery (wooden crosses supporting spray-glue in cans with the text; 'NO MORE NAILS'. Simple but strong, for it demystifies but could also be looked at as rude and offensive, which makes you wonder what you actually believe) there where some nice installations.

A giant industrial robot arm in the process of writing down the bible on a scroll immediately called forth all sorts of feelings and made me wonder. The whole installation radiated serenity. The slow elegant movements with which the arm was inscribing the words on the scroll made it seem strangely organic and combined with the 'human' in the connotations of the biblical text made it a very appealing installation. brilliant how, although it was a machine, it gave the same feeling as when there would have been a monk writing those words. In the end we are just machines, but making that visible is quite neat.

The next day Martijn, Laura (the lady who joined us) and I went on a refreshing walk. Shortly before, resting my head on the shoulder of my lovely girl, I decided to not work together with them on the installation, for my interests lie elsewhere, and my preferences concerning style and content are in such a way different from theirs, that I feel I would only hold them back, so to speak.
They agreed on this, and it will mean that Martijn and I will not work towards the same end result, but nonetheless together. I will help (when asked) in matters technical and serve as sparring partner in discussions, and Martijn will also do the latter for me and help me code (if desired).

When we stopped in a street for a picture, I discovered an object that I like. I always feel strangely drawn toward mechanically produced mass products such as nuts and bolts. So finding something like that makes me happy and might even lead me in a direction concerning the design of my final product.

My final product by the way, will be in the field of robotics, and the connection of the physical world and internet/data.


Thursday, February 5, 2009

Research and Rain.

Today Martijn and I went to Amsterdam to visit some museums for ideas and general research, only to find that all of them where not open anymore or not open yet. While discovering this, it rained. So wet and slightly dissatisfied we ate some sandwiches and tarte au citron at de Gebroeders Niemeijer which we can highly recommend. Not only are the products massif, their literature rack featured a copy of an art magazine that contained info about religion in art, which we where also looking for. You find in weird places.

What, might you wonder, has that got to do with your project? Suddenly believing in a God above and a Devil below? Nope. still believing in nothing here, but yesterday we had an really interesting talk to a fellow student at the HKU, and found out that we might do a project with her, which will concern religion, meaning (in dutch 'zingeving') and a far more personal touch.

Obviously it is not yet clear what it will all embody, but keep on reading this blog and find out.

Furthermore, saturday we will drive to Germany for a short trip to the ZKM, the center for Art and Media in Karlsruhe. Right now the museum, which was recommended to us by a teacher, features an expo entitled 'medium religion'. Obviously not to be confused with rare religion.
Since we are students and creators of media.. results of the trip will follow.

Thursday, January 29, 2009

HKU

After a period of working in a group project on the HKU, it's time for a more personal project. I will be doing this with my schoolmate Martijn Bruckman, whose blog you can also read for more info.
I will be posting my research and progress here. So keep reading.

Friday, January 9, 2009

But needs time to..

Life, once again, did continue after my last post. Looking at the regularity of posts it might have rather slowly . Or, as it did, rather quick. I find myself suddenly incredibly in love, finishing my master of arts and technology (whatever that might mean(if anyone knows (seriously)let me know. Please.)) missing mountains, hiking, ice-climbing, skiing and generaly feeling lost. But I also find myself surrounded by wonderful people like my lovely girl Maud, and good friends. So time to stop wimpering and wondering, and start to get to work.

I decided to build a really cool instructable I found and you can check out here and i'm in the middle of a workshop in which second years are building robots under guidence of me and my dear Martijn. Amazing, but true. I'll post the results soon, for I think they will amaze me. Good to see that the people who are now second year are much more advanced than I was in my second year.

Next to that there is Work Being Done on my master project. It will be disclosed at a proper time. Hold on.

Also, when looking for usefull stuff for our new home (us being me and Maud) I stumbled upon (not using the cool online tool) a pinball machine. Which I am trying to fix as we speak. Or rather read. Or use a keyboard. Well, never mind. I'll post something about the cool new toy soon.

Monday, September 15, 2008

And life, once again, continues.

Back in Holland, after a kinda short but extremely nice trip to Montpellier in France, where my incredibly beautiful and sweet girlfriend lives and studies.

Today the HKU started again, and we where introduced to our final year of school. I will participate in a project concerning our (apparent) disability to communicate with each other in public spaces. Which I have to say is true, but if I have to be honest, I contribute to this myself as well. If you find me in public transport (IF you do you are one lucky son of a bitch) I will probably be crowned by a set of large headphones (Sennheiser). So speaking to me or being spoken to by me is pretty much out of the question.
But ok, I guess we don't have to talk to each other all the time, but there is a equal lack of reason to not speak at all. So the coming weeks we will research this fact, and hopefully prototype some 'solutions' to this 'problem'. I happen to like prototyping. I do.
Speaking of which: I have been thinking about doing workshops concerning molding and casting using CNC machines and 2 component rubber or waxes. If anyone is interested in that, please let me know.

Wednesday, July 16, 2008

So how do fish stay upright?

Today a good friend of Haakon, our lab manager, came back from 3 weeks on an oil-rig. Sören (that's him) normally works off-shore for 2 weeks, and then stays on land for 4 weeks. That's the way these oil-people roll here in Norway.

To welcome him home, we had a very nice fish dinner consisting of the Red snapper that he brought along, potatoes and broccoli. They taught me how to eat the fish head (not the whole thing obviously, but the tasty parts). which turned out to be quite the snack. I was kind of surprised to find they don't eat the eyes of the fish, but the part around the eyes does get eaten. Interesting feature of the fish: the whole head is easy to disassemble, almost like it has been build with that purpose in mind. Maybe there is a creator after all, and he is smiling on us happy humans, for we have used his intelligent fish-design like he intended. In the most tasty part (according to my teachers), the brain, there are two very small and sharp bones on either side:



These bones (which apparently are sharp enough to cut glass) are used by the fish for balancing. Maybe when there is time, I should do a how-to-disassemble-a-fish-head tutorial. Although I don't know how many people will actually use that.

I'm also still working on a recurve-bow I want to make. I guess I'll make a tutorial for that once I'm finished, for it might turn out to be interesting to more people.

Sunday, July 6, 2008

Outdoors

Yesterday Alex (my colleague from the De Waag Society) arrived at the lab. Haakon promised me we would go to Tromsø (where the airport is) a bit earlier, so we can have a look at his motorbike. It appears he owns an old BMW R70 bike... This guy just keeps amazing me, but since it was sunday, everything was closed... so we just had a nice fish meal.

The day before, Haakon, Johan, Aslak and I went on a little trip to the most northern part of the peninsula we are on. Where the land meets the sea, a lot of boats crashed. When the tides change, millions of liters of water flow from or into the fjord thus creating massive currents. Walking along the shore we encountered lots of wreckage, and even found a whole ship (well, whole... check out the pictures).



We also stopped at a little lighthouse to have some tea and found a can of joika (traditional sami reindeer meat) we decided to eat. It was such a nice place that both Johan and I agreed that we would go back there to leave new food, so it was ok to eat some of the stuff there.
It was nice and cosy:

Saturday, June 28, 2008

Fresh food

Days sort of seem to flow into each other when the light never goes out. Yesterday evening we (Johan, Kenny, Luis and I) decided to go fishing on the fjord with a borrowed boat, but before we went we had to put out a starting fire at the Shopbot (the CNC machine). It seems the machine missed some steps while running through a program, got stuck and made the vacuum suck up a couple of embers... which consequently started to smolder inside the machine. Mats (one of Haakons son's) came in after dinner and told us there was smoke coming from the Shopbot house... I think we where just in time.

So when that was over we packed our stuff and headed out onto the fjord, with two fishing rods. At first we didn't catch anything, so when we landed ashore at around 3.30 in the morning we found some mussels and cooked those as a snack. Cooking them on some damp seaweed you put on a open fire works fine, and gives the mussels a nice smokey flavor.

We then took the boat further onto the fjord and by chance discovered a really beautiful spot to fish. Kenny was the first to catch a pollock and shortly after I caught one as well. I took one raw bite of the fish (first time I bite a fish that is still wriggling) and cooked the rest in some seawater. We had some cooking pots with us so steaming the fish was really easy.

When Johan caught a fish as well we walked around the shore a bit (very nice and peaceful around 9 in the morning) and then took the boat back to shore (with a nice detour of course).

Being up most of the day and fishing all night makes you kind of sleepy, so this we slept from about 12 this morning till around 6.30. I'm now working on some timelapse footage I took, and will probably spend some time working on my bow design (I'm making a bow).

And it will not get dark...

Friday, June 27, 2008

Nice and slowly

So the guys here are still working on building a modular house. They made one from cardboard that looks really well... so this evening Haakon and I drove to some wood shop 2 hours from the lab to get them 1400 kilos of plywood to make the real thing.
It was a very pleasant trip, although the weather wasn't too good; a lot of rain these last couple of days, but that doesn't really matter, since there is enough to do inside.
Haakon promised me later today the it will improve and we will get a lot of sunshine. So I will go into the mountains this weekend, probably taking Aslak (Aili's brother) with me and perhaps Johan. We'll catch fish in the mountain lake and roast it on an open fire on top of the mountain.
Everything here is moving forward fast, but nice and slowly. Aslak played a lot of Fable (cool game, check it out) on my computer today, so I read about Python and just relaxed. Kenny just made some nice bread, and the sun will not go down.

Thursday, June 26, 2008

Working, but ahead of time...

So I arrived safely in the lab in Norway... Got there and immediately got pulled towards the fjord with the guys here who made their own boats.
Guess what: they did float. So my Norway trip started floating on a quiet lake, between the mountains at the middle of the night, in perfect daylight.

Johan (on of the guys here) came up with a way of screen printing using the laser cutter and some anti-static bags in which they normally ship electronics, so I decided to make my own t-shirt. It worked out pretty well I must say. Check out the pictures below.

Norway is such a beautiful country, it never stops to amaze me. The mountains, the fresh air, the light 24 hours a day... It's just great being back here :)

Lasering the screen (attached to a wooden frame (also made with the laser))



The result after laser cutting (for the front of the shirt)


Put it on a shirt, wipe paint on it...


And there you go!



Saturday, June 21, 2008

Loose ends again

So I'll be leaving for the Fablab in Norway again this monday. Just one more night shift (after the one I'm in now) and the plane takes off.
In Norway I'll continue on building a multitouch table using the FTIR (Frustrated Total Internal Reflection) technique as described here, help as much as I can during the Kokompy camp that is currently being held (about adding functionality and usability to the cad.py program that Neal Gershenfield wrote to control all the machines in the labs from one interface) and I want to try to make a longbow like this one with the shopbot (for the handle) and some kind of lamination process for the limbs.

But today I also bought a new sleeping bag (which supposedly keeps me warm even at minus 20) and a new travel backpack to go on a long trip in the mountains. It's time for some reading about the

.

and some quiet and calm moments up in the mountains.
As Laozi said:

Gravity is the source of lightness,
calm the master of haste.

Saturday, May 17, 2008

New life and a new trip

Prototyping for an upcomming workshop in the fablab in Amsterdam, I made a small bristlebot... I nicked the idea from Matt Ratto from the Humlab (also their blog) for making small robots using unbalanced motors (vibration motors, like the ones used in vibrators and gamecontrollers), arduinos and toothbrushes. If you place the motors on the toothbrushes and let them vibrite, the robot sort of brushes over your table (surface needs to be flat though). It's really quite easy to make!
check out the video:



Cool eh?
Now the thing is to give it some sensors (i'm thinking just IR for distance, mounted on some servos) so it keeps from vibrating of the table.
not as far yet as these guys though:



And if you like that, don't forget to watch this:



Incredible machine is it not?

On a different note, today I booked a flight back (yes back) to the lab in Norway... Finally! I'll be leaving the 23th of june, and stay there till the 25th of august. After that it's back to school for one more year...

Tuesday, April 15, 2008

Sqweak!

My good friend Jarg bought a Casio digital horn today, for only 2.50 euro. In some secondhand shop he ran into the thing, and being a true music lover immediately recognized it's coolness...
the thing is not really esthetically pleasing, but casio, it's like the Who said: "You are forgiven"
The thing is way cool, cause it can output Midi. So you can hook a digital drum kit (or a eclectic collection of bird sounds) to the thing, and blow your very own drum kit from hell (or forest, for that matter).

Thing was, these casio horns apparently have a common sqweak problem... when some weird hardware problem occurs, the thing only wants to produce this high pitched irritating sound, trough which you are still able to discern some correct sounds, but makes you want to trow the thing out of the window sooner than later.

But a! aren't we living in the Fablab age? don't we fix thing's ourselves? Hell yeah!
A couple of days ago I tore apart an old Imac, an lo and behold, there was the 47 micro farad capacitor we needed to replace the weaker original component... so after only 3 minutes of soldering, we have an incredibly cool digital saxophone!

Moral of the story? Fix stuff yourself before consulting some 'specialist' who, in this case, charges 45 dollars for the fix. And you miss out on all the fun...

check out the ugly but way cool (working) gadget:

Thursday, March 20, 2008

How would you like your egg? Scrambled, cooked, flying?

And yes, it is that time of the year again, time for the Fablab annual Easter egg competition!.
My colleague Ales Schaub is working hard to get his entry finished before the deadline tomorrow night at six. At that time we will all log on to the Polycom conference (the MIT lab is running a continuous online conference) for the judging. And I guess I will be one of the judges... Probably going to be a though job! I heard that they are working on a flying egg in Norway...
So make sure to check back in here for the entries and of course the winner, who will be awarded with a free trip to the Norwegian lab... How I miss that place...

Monday, March 17, 2008

Mom, our display died. Again.

In Norway, I met a really nice guy working on an ambient light display, which consisted of little round transparent patches containing oil and water. If one applies a (probably quite high) voltage to the patches, the oil will move to the side, thus letting light shine trough. If you line up an array of these things, and apply a current to specific ones, it's possible to display information. Kind of like E-ink is supposed to work i guess, but surely way cooler... you can build it yourself.
Then, last wednesday, I met this guy at the lab at Pakhuis de Zwijger, who is also trying to build an display, only he is using bacteria! Apparently, if you lower (or raise, not sure which) the PH value of certain bacteria, you can get the suckers to glow. So using these fluorescent bacteria, one can in theory create a display... how cool is that? You will have actual dead pixels!
I don't think our houses will be equipped with this technique for some time, because the stuff dies rather quickly, and is not really easy to handle. Real cool project though.
Check out his site: biodisplay

Wednesday, February 20, 2008

Tuesday, February 19, 2008

Keep yourself busy

E-mails tell us that by now most of the boot camp participants returned safely back home. And home is, among other things, where the work is. I started working on our project at the HKU, which deals with designing a 'concept room' for the dutch tax services. Nice challenge there, cause those guys really fucked up on software the last couple of years, and are now trying to make up for that, which asks for quite the attitude change on account of the workers.
I'm also starting conversations about fab related projects here in Holland, so more on that to come.

Still miss Norway though...

On a different note, anybody seen this weird article? I was thinking that this big earth changing event was going to happen around 2013 or so... when the last of the Mayan calendars ends. Could be those guys where not so precise in retrospect... just a couple of years of. In Norway iI was really enjoying the darkness (no, not the rock band), so could be the earth rotates in such a way that Holland will also have 2 hours of light a day... wouldn't that be marvelous?

speaking of Mayans, I've just seen the movie 'The Fountain' by Darren Aronofsky (director of 'Pi' and 'Requiem for a dream') and I must say, great movie. Perhaps not for those among us who don't like fairy tales or to much interwoven story lines (or indeed Mayans), but for them who like dreaming, love, life and death and the occasional meditative moment... do watch it.