title: Calculating the average of Sensor Data (Capacitive Sensor)
body: <p>So I am starting to mess around with Capacitive sensors and all because its some pretty cool stuff. </p>
  
  <p>I have followed some tutorials online about how to set it up and use the CapSense library for Arduino and I just had a quick question about this code i wrote here to get the average for that data.</p>
  
  <pre><code>void loop() {                    
    long AvrNum;
    int counter = 0;
  
    AvrNum += cs_4_2.capacitiveSensor(30);
    counter++;
  
    if (counter = 10) {
      long AvrCap = AvrNum/10;
      Serial.println(AvrCap);
      counter = 0;
    }
  }
  </code></pre>
  
  <p>This is my loop statement and in the Serial it seems like its working but the numbers just look suspiciously low to me. I'm using a 10M resistor (brown, black, black, green, brown) and am touching a piece of foil that both the send and receive pins are attached to (electrical tape) and am getting numbers around about 650, give or take 30. </p>
  
  <p>Basically I'm asking if this code looks right and if these numbers make sense...?</p>