update optosensor threshold