Porting of Arduino code to modularized version

Jira issue: WP-977
Merge pull request #1 from glatorre/WP-977

Porting of Arduino code to modularized version [WP-977]