1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00
Arduino/libraries/Robot_Control/RobotSdCard.cpp
2013-05-15 10:47:17 +02:00

22 lines
454 B
C++

#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]);
}
}*/