http://users.wpi.edu/~bamiller/WPIRoboticsLibrary/d3/d3a/class_analog_channel.html
这不就是个求平均值的函数吗?
可以参考一下我这里这个程序去求