×

Hello and Welcome! If you have a technical question please check out our Forums. If you have an order or shipping question please refer to our Customer Support page. Please see all COVID-19 updates here and thank you for your continued support.

Member #330638

Member Since: June 11, 2012

Country: United States

  • I got an excellent stroke, doing an average of every 13 beats. This softens the stroke. Here is the code: void loop () { int average= 0; int reading; if ((digitalRead (10) == 1) || (digitalRead (11) == 1)) { Serial.println ('!'); } else { // send the value of analog input 0: for (int i = 0; i <13; i ++) { reading + = analogRead (A0); delay (1); } average= reading / 13; Serial.println (average); } // Wait for a bit to keep serial data from saturating

    }

No public wish lists :(