| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Koe Josephine Lab 5 Code

Page history last edited by Josephine 8 years, 9 months ago

#include <SPI.h>

#include <SD.h>

#include <Adafruit_GFX.h>

#include <Adafruit_PCD8544.h>

 

#define CONTRAST 55

Adafruit_PCD8544 display = Adafruit_PCD8544(7,6,5,-1,-1);

const int chipSelect = 17;

 

void setup() {  

  pinMode(17, OUTPUT);  

  if (!SD.begin(chipSelect)) return;

  File dataFile = SD.open("datalog.txt");  

  if (dataFile) {

    while (dataFile.available()) {

      display.print((char)dataFile.read());

    }

    dataFile.close();

  } 

  display.begin();

  display.setContrast(CONTRAST);

}

void loop() {}

 

Comments (0)

You don't have permission to comment on this page.