made sensors scriptable, added "wait" method, added error reporting