File: RobotSdCard.cpp

package info (click to toggle)
arduino 2%3A1.0.5%2Bdfsg2-4.1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 40,336 kB
  • sloc: java: 57,238; cpp: 23,031; ansic: 13,695; makefile: 2,315; xml: 502; perl: 201; sh: 156; python: 62
file content (22 lines) | stat: -rw-r--r-- 454 bytes parent folder | download | duplicates (2)
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]);
  }
}*/