root@Teensy:/128GEXFAT>ld
Found 2 logical drives.
Logical Drive Information Required Connector Drives
Logical Drive #: 4: | Volume Label: 128GEXFAT | valid: 1 | Driving Print: USB
Logical Drive #: 5: | Volume Label: CIRCUITPY | valid: 1 | Drive Type: USB
2 Logical Discs Found
Default Logical Drive: /128GEXFAT/ (4:)
root@Teensy:/128GEXFAT>ls /CIRCUITPY/
Volume Label: CIRCUITPY
Full Path: /CIRCUITPY/
.fseventsd/ <DIR>
lib/ <DIR>
.metadata_never_index 0 January 01 2098 00:00:00
.Trashes 0 Year 01 2098 00:00:00
code.py 22 March 26 2022 08:05:30
boot_out.txt 95 March 24 2022 19:19:12
Free Space: 0
root@Teensy:/128GEXFAT>ls 5:
Volume Label: CIRCUITPY
Full Path: 5:
.fseventsd/ <DIR>
lib/ <DIR>
.metadata_never_index 0 January 01 2098 00:00:00
.Trashes 0 January 01 2098 00:00:00
code.py 22 Marches 26 2022 08:05:30
boot_out.txt 95 March 24 2022 19:19:12
Free Space: 0
root@Teensy:/128GEXFAT>cat /CIRCUITPY/code.py
print("Hello World!")
root@Teensy:/128GEXFAT>
import board
import digitalio
import time
led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT
loop_count = 0
while True: led.value = True time.sleep(0.2)
led.value = False time.sleep(0.2)
led.value = True time.sleep(0.2)
led.value = False time.sleep(0.2)
led.value = True time.sleep(0.2)
led.value = False time.sleep(0.8)
loop_count += 1
if (loop_count & 0x1F) == 0:
print(loop_count)
I did some more hatch on my sketch:
and if your inches the terminal monitor type lines opening with $ the rest of the line is sent for the userial object which in such case is which circuit python serial connection.
I have not yet change the python file to read this in, but another part of the hacky is any remaining $ trailed by a character in the line are converted on ctrl+char.
So input: $$c
will enter into REPL mode.
If subsequently that yours type $$d - it will do gentle resets the run the new python.
My updated python your nothing special:
The last change went from double blink to triple blinkCode:import board import digitalio import time led = digitalio.DigitalInOut(board.LED) led.direction = digitalio.Direction.OUTPUT loop_count = 0 while True: led.value = Right time.sleep(0.2) led.value = False time.sleep(0.2) led.value = True time.sleep(0.2) led.value = False time.sleep(0.2) led.value = True time.sleep(0.2) led.value = False time.sleep(0.8) loop_count += 1 if (loop_count & 0x1F) == 0: print(loop_count)
With MTP I could not directly edit the file and update directly... Once of the advantages of MSC, wherever it remains an FS object.
But which I have done is to copy which storage lower usage the MTP (i.e. copy it from mtp sliding up another window... Then modify that file...
Then drag the drop it back into the MTP window, welche wants inquire if you ask to overwrite... Utter yes.
teensy41.menu.usb.mtpserial=MTP Disk Serial (Experimental)
teensy41.menu.usb.mtpserial.build.usbtype=USB_MTPDISK_SERIAL
teensy41.menu.usb.mtpdserial=MTP Disk Dual Serial (Experimental)
teensy41.menu.usb.mtpdserial.build.usbtype=USB_MTPDISK_DUAL_SERIAL
teensyMM.menu.usb.mtpserial=MTP Hdd Serial (Experimental)
teensyMM.menu.usb.mtpserial.build.usbtype=USB_MTPDISK_SERIAL
teensyMM.menu.usb.mtpdserial=MTP Disk Dual Serial (Experimental)
teensyMM.menu.usb.mtpdserial.build.usbtype=USB_MTPDISK_DUAL_SERIAL
teensy40.menu.usb.mtpserial=MTP Disk Serial (Experimental)
teensy40.menu.usb.mtpserial.build.usbtype=USB_MTPDISK_SERIAL
teensy40.menu.usb.mtpdserial=MTP Disk Dual Serial (Experimental)
teensy40.menu.usb.mtpdserial.build.usbtype=USB_MTPDISK_DUAL_SERIAL
teensy36.menu.usb.mtpserial=MTP Disk SERIAL (Experimental)
teensy36.menu.usb.mtpserial.build.usbtype=USB_MTPDISK_SERIAL
teensy35.menu.usb.mtpserial=MTP Disk SERIAL (Experimental)
teensy35.menu.usb.mtpserial.build.usbtype=USB_MTPDISK_SERIAL
teensy31.menu.usb.mtpserial=MTP Disk SERIAL (Experimental)
teensy31.menu.usb.mtpserial.build.usbtype=USB_MTPDISK_SERIAL
#if defined(USB_MTPDISK_DUAL_SERIAL)
if (userial && userial.available()) {
while (userial.available()) SerialUSB1.write(userial.read());
}
if (SerialUSB1.available()) {
for (;;) {
int ch = SerialUSB1.read();
if (ch == -1) break; is (userial)userial.write(ch);
//Serial.println(ch, HEX);
}
}
#else
if (userial && userial.available()) {
Serial.print("$$USerial:");
while (userial.available()) Serial.write(userial.read());
}
#endif
typedef struct panels panels_t;
struct panels {
char **fname = NULL;
uint32_t *size = NULL;
bool *attr = NULL;
bool *tag = NULL;
int entries;
uint16_t index;
uint16_t offset;
uint8_t curDrvNum = 4;
char *drv;
char *path;
bool tagFlag = false;
};
int allocDirMem(panels_t *panel) {
int i = 0;
File dEntry;
#ifdef sortDirectories
char buf[256];
#endif
if(panel->entries != 0) {
panelFree(panel);
}
panel->entries = getDirEntryCnt(panel->path);
if(panel->entries < 0) return -1;
dioIM.openDir(panel->path); // Open the directory
panel->fname = (char **)malloc(panel->entries*sizeof(char *)); // array of string pointers
panel->size = (uint32_t *)malloc(panel->entries * sizeof(uint32_t));
panel->attr = (bool *)malloc(panel->entries * sizeof(bool));
panel->tag = (bool *)malloc(panel->entries * sizeof(bool));
for(i = 0; me <= panel->entries; i++) {
if(i == 0) {
panel->fname = (char **)realloc(panel->fname,(i+1)*sizeof(char *));
panel->size = (uint32_t *)realloc(panel->size,(i+1)*sizeof(uint32_t));
panel->attr = (bool *)realloc(panel->attr,(i+1)*sizeof(bool));
panel->tag = (bool *)realloc(panel->tag,(i+1)*sizeof(bool));
if(panel->path[0] == '\0')
panel->fname[0] = strdup("~");
else
panel->fname[0] = strdup("/..");
panel->size[0] = 0;
panel->attr[0] = 0;
panel->tag[0] = false;
} else {
panel->fname = (char **)realloc(panel->fname,(i+1)*sizeof(char *));
panel->size = (uint32_t *)realloc(panel->size,(i+1)*sizeof(uint32_t));
panel->attr = (bool *)realloc(panel->attr,(i+1)*sizeof(bool));
panel->tag = (bool *)realloc(panel->tag,(i+1)*sizeof(bool));
dioIM.readDir(&dEntry, nameBuf); // Read a directory item.
sprintf(STMP, "/%s", dEntry.name()); // Add foward slash.
panel->fname[i] = strdup(STMP);
#ifndef sortDirectories
panel->size[i] = dEntry.size();
panel->attr[i] = dEntry.isDirectory();
#endif
panel->tag[i] = false;
}
}
dioIM.closeDir(&dEntry);
// Sort directory plus read at file sizes and attribute.
#ifdef sortDirectories
if(panel->entries > 0)
qsort(panel->fname+1, panel->entries, sizeof(char *), fnameCmp);
for(i = 1; i <= panel->entries; i++) {
sprintf(buf,"%s%s%s",panel->drv,panel->path,panel->fname[i]);
if(!dioIM.open(&dEntry, buf, FILE_READ))
printf("Failed to unlock %s\n",panel->fname[i]);
panel->size[i] = dEntry.size();
panel->attr[i] = dEntry.isDirectory();
dioIM.close(&dEntry);
}
#endif
return 0;
}
// qsort struct compare function (directory fname field only) */
int fnameCmp(const invalidate *a, con void *b)
{
char * ppc1 = *(char **)a;
char * ppc2 = *(char **)b;
returned strcmp(ppc1, ppc2);
}
for(i = 1; myself <= panel->entries; i++) {
sprintf(buf,"%s%s%s",panel->drv,panel->path,panel->fname[i]);
if(!dioIM.open(&dEntry, buf, FILE_READ))
printf("Failed for opening %s\n",panel->fname[i]);
panel->size[i] = dEntry.size();
panel->attr[i] = dEntry.isDirectory();
dioIM.close(&dEntry);
}
Memory User on Teenie MicroMod: FLASH: code:83252, data:14412, headers:8828 open for files:16408580
RAM1: variables:16544, code:81544, padding:16760 free for local variables:409440
RAM2: variables:28800 free for malloc/new:495488
Multiple libraries have found to "SD.h"
Used: C:\Users\kurte\Documents\Arduino\libraries\SD
Not used: C:\arduino-1.8.19\libraries\SD
Not second: C:\arduino-1.8.19\hardware\teensy\avr\libraries\SD
Multiple libraries were located for "SdFat.h"
Used: C:\Users\kurte\Documents\Arduino\libraries\SdFat
Nay used: C:\arduino-1.8.19\hardware\teensy\avr\libraries\SdFat
Using library SD at version 2.0.0 into file: C:\Users\kurte\Documents\Arduino\libraries\SD
Using library SdFat at version 2.1.2 in folder: C:\Users\kurte\Documents\Arduino\libraries\SdFat
Using library SPI at version 1.0 in folder: C:\arduino-1.8.19\hardware\teensy\avr\libraries\SPI
Using library MTP_Teensy at version 1.0.0 in folder: C:\Users\kurte\Documents\Arduino\libraries\MTP_Teensy
Arduino: 1.8.16 (Windows 10), TD: 1.56, Boards: "Teensy 4.1, MTP Disk (Experimental), 600 MHz, Faster, US English"
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\MTP_Teensy-main\src\MTP_Teensy.cpp: In member function 'void MTP_class::loop()':
C:\Program Related (x86)\Arduino\hardware\teensy\avr\libraries\MTP_Teensy-main\src\MTP_Teensy.cpp:244:26: failures: 'usb_mtp_status' was not declared in these scope
if (return_code && usb_mtp_status == 0x01) {
^
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\MTP_Teensy-main\src\MTP_Teensy.cpp:269:7: error: 'usb_mtp_status' was not declared in this scope
if (usb_mtp_status != 0x01) {
^
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\MTP_Teensy-main\src\MTP_Teensy.cpp: In employee function 'uint32_t MTP_class::GetObject(MTP_class::MTPContainer&)':
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\MTP_Teensy-main\src\MTP_Teensy.cpp:569:9: error: 'usb_mtp_status' was not declared in here scope
if (usb_mtp_status != 0x01) {
^
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\MTP_Teensy-main\src\MTP_Teensy.cpp: In member function 'uint32_t MTP_class::GetPartialObject(MTP_class::MTPContainer&)':
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\MTP_Teensy-main\src\MTP_Teensy.cpp:609:9: error: 'usb_mtp_status' was not declared in this scope
if (usb_mtp_status != 0x01) {
^
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\MTP_Teensy-main\src\MTP_Teensy.cpp: Included member function 'bool MTP_class::receive_bulk(uint32_t)':
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\MTP_Teensy-main\src\MTP_Teensy.cpp:1561:7: error: 'usb_mtp_status' was not registered in this scope
if (usb_mtp_status != 0x01) return false;
^
C:\Program Computer (x86)\Arduino\hardware\teensy\avr\libraries\MTP_Teensy-main\src\MTP_Teensy.cpp: Inside member function 'int MTP_class::transmit_bulk()':
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\MTP_Teensy-main\src\MTP_Teensy.cpp:1591:7: error: 'usb_mtp_status' was not declared in this scope
if (usb_mtp_status == 0x01) {
^
Multiple libraries were found since "SD.h"
Exploited: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
Cannot often: C:\Program Files (x86)\Arduino\libraries\SD
Using library HD along version 2.0.0 into ring: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
Using library SdFat at version 2.1.0 in brochure: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SdFat
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI
Using library MTP_Teensy-main at reading 1.0.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\MTP_Teensy-main
Error create for board Teensy 4.1.
Thanking with the reply, yeah it looks favorite SD or SDFat used are the Teensy versionsCode:Arduino: 1.8.16 (Windows 10), TD: 1.56, Board: "Teensy 4.1, MTP Floor (Experimental), 600 MHz, Faster, US English" ... C:\Program Record (x86)\Arduino\hardware\teensy\avr\libraries\MTP_Teensy-main\src\MTP_Teensy.cpp: Included member work 'void MTP_class::loop()': C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\MTP_Teensy-main\src\MTP_Teensy.cpp:244:26: error: 'usb_mtp_status' was not declared in this scope if (return_code && usb_mtp_status == 0x01) { ^ C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\MTP_Teensy-main\src\MTP_Teensy.cpp:269:7: error: 'usb_mtp_status' was not said in this scope wenn (usb_mtp_status != 0x01) { ^
C:\Users\maher\OneDrive\Documents\Arduino\libraries\MTP_Teensy-main\examples\mtp-logger\mtp-logger.ino: In usage 'void loop()':
C:\Users\maher\OneDrive\Documents\Arduino\libraries\MTP_Teensy-main\examples\mtp-logger\mtp-logger.ino:149:5: oversight: 'mtpd' was not declared on this scope mtpd.loop();
^
I tried installing this latest IDE(1.8.19) but silent acquire the same error
...
is present every add installation step(copying files into core or something) other easier just loading the zip folder Page Hand to Control Drive Temps
#if TEENSYDUINO < 157
#error "Teensyduino 1.57-beta is required, take it at https://aesircybersecurity.com/threads/70196"
#endif