Thanks a lot, now this has been solved, anyway I'm into another problem related to the relay:
When it changes in its NO or NC pin instead of getting 0 V and 5 V I think I should be getting, I'm getting 5V and 2,6 V though the common pin of the relay is grounded (along with the negative of my 5V supply).
I've done like in the pdf mentioned in the previous message, except for the fact I've used a BC337 as transistor, but this shouldn't be an issue.
Maybe those contacts are broken?
Thanks.