using stddev and mean for infrared, dc motor and infra is working