Updated primary iot app script for two sensors