@Fluxanode
two answers here
- do not use Sdfat.h but only SD.h, which since recently uses Sdfat internally.
- teensy is a mtp responder and therefore has no control in what PC (the master or initiator) knows about the existing files.
in particular, when teensy is adding files (during data acquisition) , PC will not know about this. The MTP protocol is designed to transfer existing files and not to monitor a device.
Under normal circumstances, Teensy should only reply to PC requests. However, there are some possibilities that teensy informs PC that situation has changed. One of this options is to reset completely the MTP. this is done in mtp-basic by receiving the letter 'r' from the PC.
two comments:
better not to call mtpd.loop() while in acquisition mode, it is useless. better to call this function only when acquisition is stopped.
you may check with mtp-logger.ino how this could be done.
two answers here
- do not use Sdfat.h but only SD.h, which since recently uses Sdfat internally.
- teensy is a mtp responder and therefore has no control in what PC (the master or initiator) knows about the existing files.
in particular, when teensy is adding files (during data acquisition) , PC will not know about this. The MTP protocol is designed to transfer existing files and not to monitor a device.
Under normal circumstances, Teensy should only reply to PC requests. However, there are some possibilities that teensy informs PC that situation has changed. One of this options is to reset completely the MTP. this is done in mtp-basic by receiving the letter 'r' from the PC.
two comments:
better not to call mtpd.loop() while in acquisition mode, it is useless. better to call this function only when acquisition is stopped.
you may check with mtp-logger.ino how this could be done.