Guest User

Untitled

a guest
Feb 18th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. const int pinAdc = A0;
  2.  
  3. void setup()
  4. {
  5. Serial.begin(115200);
  6. }
  7.  
  8. void loop()
  9. {
  10. long sum = 0;
  11. for(int i=0; i<32; i++)
  12. {
  13. sum += analogRead(pinAdc);
  14. }
  15.  
  16. sum >>= 5;
  17.  
  18. Serial.println(sum);
  19. delay(10);
  20. }
Add Comment
Please, Sign In to add comment