Hey thanks for the prompt response..
My problem is that I am using a waspmote, not arudino (although are almost the same, but have their own API etc).
So I really can't use this and I am not having a lot of time right now to even look into understanding it and try to port it to waspmote
Thanks anyway