code from the nodebeginner walkthrough with added handlers for the arduinos to hit