Added latest sensor code from Lucas.
Added latest sensor code from Lucas.