I'm trying to average out (currently 2 but hopefully more later) sensor readings and then light up the correct led with the average result over pwn.
So essentially its an expanded version of the code found in the example analog -> smooth .
http://pastebin.com/wGukpNuX is the code i have so far.
When N_SENSORS = 1; it works just how i want it, yet when i try to increase the number of sensors it flashes the led kinda randomly and outputs sometimes huge numbers from sensorTotals..
Kinda lost atm
Any help would be greatly appreciated Thanks.