Messaging and peripheral type tweak

Added more code for messaging. Changed getPeripheralType to getMotorType
and getSensorType.