General Motors has developed a new sensor and alarm system intended to prevent the deaths of children or pets left in vehicles in hot weather.