aboutsummaryrefslogtreecommitdiff
path: root/libraries/Robot_Control/RobotSdCard.cpp
blob: df833d2c70f12b3cbdb9a887dbc3b1eea3c2a97c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <ArduinoRobot.h>

void RobotControl::beginSD(){
  card.init();
  file.init(&card);
  melody.init(&card);
}

void RobotControl::_enableSD(){
  DDRB = DDRB & 0xDF; //pinMode(CS_LCD,INPUT);
  DDRB = DDRB | 0x10; //pinMode(CS_SD,OUTPUT);
}

/*
void RobotControl::sdTest(){
  file.open("Infor.txt",O_READ);
  uint8_t buf[7];
  char n;
  while ((n = file.read(buf, sizeof(buf))) > 0) {
    for (uint8_t i = 0; i < n; i++) Serial.write(buf[i]);
  }
}*/