The sensorNTrend is an array because I need to observe when the trend changes direction. I could actually just create a variable for the last reading but I thought it might be useful to look at those values over a longer span of time.
Ahhh, I see what you mean about my shiftArray function. I needlessly create another integer array when I should just be looping through my array in reverse and shifting data.
I did consider circular array implementation but then I figured it would have been more of a challenge to implement the findTrend algorithm.
As for the varying conventions I use... I plead the fact that I am still relatively new to code and I need to solidify my style
Thanks for getting me thinking and helping me learn!