فهرست منبع

Better ATmega32u4 detection

Just Call Me Koko 4 سال پیش
والد
کامیت
a52e52962d
2فایلهای تغییر یافته به همراه12 افزوده شده و 0 حذف شده
  1. 8 0
      esp32_marauder/SDInterface.cpp
  2. 4 0
      esp32_marauder/a32u4_interface.cpp

+ 8 - 0
esp32_marauder/SDInterface.cpp

@@ -51,6 +51,14 @@ bool SDInterface::initSD() {
 
     //if (this->supported)
     //  buffer_obj.open(&SD);
+
+    // Check for SCRIPTS folder
+    if (!SD.exists("/SCRIPTS")) {
+      Serial.println("/SCRIPTS does not exist. Creating...");
+
+      SD.mkdir("/SCRIPTS");
+      Serial.println("/SCRIPTS created");
+    }
     
     return true;
   }

+ 4 - 0
esp32_marauder/a32u4_interface.cpp

@@ -9,6 +9,10 @@ void A32u4Interface::begin() {
 
   Serial.println("Setup A32U4 Serial Interface");
 
+  MySerial_two.println("DELAY 1");
+
+  delay(1000);
+
   uint8_t a32u4_rep = 0;
 
   if (MySerial_two.available()) {