Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uint32_t timer;
- int reading;
- uint32_t counter;
- void setup()
- {
- Serial.begin(9600);
- }
- void loop()
- {
- timer = millis();
- while(1)
- {
- reading = analogRead(0);
- counter++;
- if(millis() - timer > 10000)
- {
- break;
- }
- }
- Serial.println(counter);
- counter = 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement