Refactor of Arduino code, README updated, added LICENSE