copy code from original sensor