My code from the Hardware Software Interface Class