You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Arduino ide 1.8.19, Teensyduino 1.57, Teensy4.1 board, windows11
I have inserted the below code onto lines 1,2,7,103,106,107,200 plus a delay on line 201 into my sketch further below that drives leds in the hope of bringing the mtp window up for a few minutes giving me time to upload my png images before then proceeding to run my led code starting on line 202 in the loop without any success, any suggestions or perhaps a "run mtp once then do other stuff afterwards" example sketch for your mtp library thanks
ps I have Tycommander installed which through its reset allows me to invoke the above
#include <SD.h>
#include <MTP_Teensy.h>
#define CS_SD BUILTIN_SDCARD // Works on T_3.6 and T_4.1
//#define CS_SD 10 // Works on SPI with this CS pin
void setup()
{
// mandatory to begin the MTP session.
MTP.begin();
// Add SD Card
SD.begin(CS_SD);
MTP.addFilesystem(SD, "SD Card");
}
void loop() {
MTP.loop(); //This is mandatory to be placed in the loop code.
}
Sorry, I did not notice this issue earlier. Hope you don't mind I edited your comments to put in code tags to make it easier to follow.
Are you still having an issue?
Feature request?
In loop:
void loop() {
MTP.loop();
delay(20000);
needless to say each call into loop in addition to the time taken in MTP.loop, it will have at least a 20 second delay before anything else happens.
If you are in a time sensitive area of code, you control when MTP.loop() is called. I have not played with it enough to know what happens if you don't call it for many seconds. The host may simply time you out and drop the connection.
Using Arduino ide 1.8.19, Teensyduino 1.57, Teensy4.1 board, windows11
I have inserted the below code onto lines 1,2,7,103,106,107,200 plus a delay on line 201 into my sketch further below that drives leds in the hope of bringing the mtp window up for a few minutes giving me time to upload my png images before then proceeding to run my led code starting on line 202 in the loop without any success, any suggestions or perhaps a "run mtp once then do other stuff afterwards" example sketch for your mtp library thanks
ps I have Tycommander installed which through its reset allows me to invoke the above
My LED Code...
The text was updated successfully, but these errors were encountered: