1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-04 15:24:12 +01:00
Arduino/libraries/Robot_Control/arch/avr/RobotSdCard.cpp
2013-09-10 16:46:33 +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]);
}
}*/