Added my raspberry spi class.
Refactored code