星瞳实验室APP,快速收到回复
  • 我们只解决官方正版的OpenMV的问题(STM32),其他的分支有很多兼容问题,我们无法解决。
  • 如果有产品硬件故障问题,比如无法开机,论坛很难解决。可以直接找售后维修
  • 发帖子之前,请确认看过所有的视频教程,https://singtown.com/learn/ 和所有的上手教程http://book.openmv.cc/
  • 每一个新的提问,单独发一个新帖子
  • 帖子需要目的,你要做什么?
  • 如果涉及代码,需要报错提示全部代码文本,请注意不要贴代码图片
  • 必看:玩转星瞳论坛了解一下图片上传,代码格式等问题。
  • [ESP32] could not find any example in Arduino framework



    • #include <Arduino.h>
      #include <SPI.h>
      #include <SD.h>
      
      SPIClass spiSD(VSPI);
      #define SD_CS 15
      
      void setup()
      {
      	Serial.begin(115200);
      
      	SPI.end();
      	spiSD.begin(18, 19, 23, SD_CS);
      
      	pinMode(39, INPUT);
      	if (digitalRead(39) == LOW)
      	{
      		log_i("SDCard attached!");
      	}
      	else
      	{
      		log_i("SDCard detached!");
      	}
      
      	if (!SD.begin(SD_CS, spiSD))
      	{
      		Serial.println("initialization failed!");
      		return;
      	}
      }
      
      void loop()
      {
      }
      

      https://singtown.com/learn/48770/
      I try to follow this tutorial to convert the code into Arduino but I could not connect to the Sdcard.
      I also change the other pin but failed too

      	spiSD.begin(12, 13, 14, 15); //try 1
      	spiSD.begin(12, 13, 14, 5);  //try 2
      
      

      console log:

      clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
      mode:DIO, clock div:1
      load:0x3fff0018,len:4
      load:0x3fff001c,len:1216
      ho 0 tail 12 room 4
      load:0x40078000,len:9720
      ho 0 tail 12 room 4
      load:0x40080400,len:6352
      entry 0x400806b8
      [I][main.cpp:18] setup(): SDCard attached!
      [E][sd_diskio.cpp:739] sdcard_mount(): f_mount failed 0x(d)
      initialization failed!
      

      update 1:
      I also try micro python but it not work too

      import time
      import machine, sdcard, os
      from machine import SPI, Pin
      
      ledValue = 0
      led=Pin(12, Pin.OUT)
      led.value(1)
      time.sleep(1)
      
      try:
        sd = sdcard.SDCard(SPI(2, sck=Pin(18), mosi=Pin(23), miso=Pin(19)), Pin(15))
        os.mount(sd, '/sd')
        ledValue = 1
      except:
        sd = None
        ledValue = 0
        
      if(sd):
        ledValue = 1
      
      led.value(ledValue)  #Led turn off due too sd initialize failed+