k210可以连接但是无法运行

可以连接maixpy,但是点击运行以后过一会就断开连接了,没有报错,没爆内存。

  • 你看下这篇博客吧, 应该有用👉 :【MaixPy】:K210识别简例(简单二维码检测和双二维码检测)
  • 除此之外, 这篇博客: K210-Maixpy初试中的 7.运行代码 部分也许能够解决你的问题, 你可以仔细阅读以下内容或跳转源博客中阅读:
  • 运行下面的代码修改存在Flash上的 config.json 的板子引脚信息。

    fpioa映射时用到这些引脚信息,到时直接查原理图也行,也可以运行下面的代码,会将config.json自动保存在Flash中。

    import json
    config = {
      "type": "bit",
      "board_info": {
          'LED0':0,
          'LED1':1,
          'BOOT_KEY': 16,
          'LED_R': 6,
          'LED_G': 7,
          'LED_B': 8,
          'MIC0_WS': 33,
          'MIC0_DATA': 34,
          'MIC0_BCK': 32,
      }
    }
    
    cfg = json.dumps(config)
    print(cfg)
    
    try:
      with open('/flash/config.json', 'rb') as f:
        tmp = json.loads(f.read())
        print(tmp)
        if tmp["type"] != config["type"]:
          raise Exception('config.json no exist')
    except Exception as e:
      with open('/flash/config.json', "w") as f:
        f.write(cfg)
      import machine
      machine.reset()