Refactored the Java code, applied communication port checks, added a
Java Arduino class to handle constants used in the Arduino code in one
place in the Java code and optimized the Arduino code to handle
everything based on the FIRST_PIN and MAX_PIN values dynamically.
Merge pull request #1 from MarcAndreWyss/master-refactoring-1

Merge from master-refactoring-1 branch to master branch