Tag Archive: average value


Below, is an Arduino function for reading smoothly an average value from a jumpy or erratic analog input sensor. The function reads repeatedly from an analog input, calculating a running average and returns the value back to the caller.

Continue reading

This project refers to an Arduino sketch which has the capability to send measurements collected by a light sensor to an account at Twitter to be seen by many through the World Wide Web.

Continue reading

This project refers to an Arduino sketch which with the help of a relay (electromechanical switch) and a light sensor can drive an external device (e.g. a household lamp, a car alarm, a home air conditioner). More specifically, the Arduino collects samples from a light sensor at a specific rate and calculates the mean of samples for best accuracy. Then, if the average exceeds a threshold limit, it will activate the device via the relay. Also, the opposite happens where, if the average sensor value drops below the limit mentioned, the device is turned off.

Continue reading