This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Processing RSSI Value

At the moment I am collecting 64 RSSI values into an array and want to calculate the average and variance of them. I have managed to calculate the average by adding up the values during collection but trying to find the deviation after the collection phase is not working. It seems as though the RSSI values have just been forgotten and a random variance value is spat out. I have attached the code below and highlighted where the code seems to be going wrong. Any observations or recommendations would be much appreciated! Apologies in advance for the novice level code. Thanks!

Related