Initialise device.