Work in progress. Add struct to contain data from device