Well,
If you went through the examples of energia, you ll notice that they are exactly the same as arduino examples.
The only difference is in the base level libraries..
You can copy-paste examples(mostly, but dont quote me on that) from arudino into energia and it will still compile.