Datasheet
view raw
pinMode(8, OUTPUT);
Serial.println("Ready!");
}
uint8_t i=0;
void loop() {
digitalWrite(8, HIGH);
logfile.print("A0 = "); logfile.println(analogRead(0));
Serial.print("A0 = "); Serial.println(analogRead(0));
digitalWrite(8, LOW);
delay(100);
}
adalogger.ino hosted with ❤ by GitHub
You'll draw 11mA or so for 100ms during the delay(100) line. Since we blink the pin #8 LED, we'll also get a 11mA
blip for about 10ms. The data for the SD card is buffered which means that whenever we reach 512 bytes of log file
that needs to be written, the SD card will actually write the data. When this happens you'll see a 50mA pulse for
10ms. If you use flush() to write the log file, this pulse will be much longer, as you have to write the file as well as
the file table sectors. Your 50mA spike could end up being 500ms or longer. So basically, keep your file writes to a
minimum if you can avoid it!
ENable pin
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m0-adalogger Page 25 of 47










