Maybe this is a common topic ... I have an Arduino IDE 1.8.7 and the latest Teensyduino 1.44 on a WIN 10 machine. The target hardware is a Teensy3.5 module.
I developed a code for a single channel data logger which also interacts with a LabVIEW utility on the PC to set parameters like logging interval , data time and download logged data via the Serial1 port. All well.
But had to sweat it out initially due to the library conflicts - even now the SD library is one copied from the Teensy folder and pasted into my sketch folder. Otherwise the code does not compile with the native SD library. In the past had similar issues with Wire Library.
How to force the Compiler to use the Teensy library objects when the Board is a Teensy one ? Isnt this a obvious thing to be done .... maybe its not that easy as it sounds ??
For instance the code below when called provides the name of the log file + bytes in a regualr Atmega 328P MCU. But on the Teensy it produces a funny line like "SYSTEM ~1.." and thats it !!
I developed a code for a single channel data logger which also interacts with a LabVIEW utility on the PC to set parameters like logging interval , data time and download logged data via the Serial1 port. All well.
But had to sweat it out initially due to the library conflicts - even now the SD library is one copied from the Teensy folder and pasted into my sketch folder. Otherwise the code does not compile with the native SD library. In the past had similar issues with Wire Library.
How to force the Compiler to use the Teensy library objects when the Board is a Teensy one ? Isnt this a obvious thing to be done .... maybe its not that easy as it sounds ??
For instance the code below when called provides the name of the log file + bytes in a regualr Atmega 328P MCU. But on the Teensy it produces a funny line like "SYSTEM ~1.." and thats it !!
Code:
void printDirectory(File dir, int numTabs) {
while (true) {
File entry = dir.openNextFile();
if (! entry) {
// no more files
break;
}
for (uint8_t i = 0; i < numTabs; i++) {
Serial.print('\t');
}
Serial.print(entry.name());
if (entry.isDirectory()) {
Serial.println("/");
printDirectory(entry, numTabs + 1);
} else {
// files have sizes, directories do not
Serial.print("\t\t");
Serial.print(entry.size(), DEC);
Serial.println(" bytes");
}
entry.close();
}
}