getPeripheralType

Added method that gives the type of the sensor/motor as an enum. This is
included in messages to the UI. Added more initialization code to the
main sketch.