当前位置:网站首页>【踩坑】复活 Pico-Go
【踩坑】复活 Pico-Go
2022-07-15 20:10:00 【高厉害】
复活 Pico-Go
最近准备玩玩硬件,入手一个 Raspberry Pi Pico。
刷上 micropython 的固件之后,可以通过 minicom 连接到 mircropython 的 REPL。
参考 -> handbook raspberry pi pico python sdk。
如果想要写文件进去,可以用官方文档中提到的 IDE Thonny -> https://thonny.org/ 。
还有另一个选择,就是在 vscode 里开发。
对于 C/C++ SDK,参考 -> handbook getting started with pico。
对于 Python SDK,可以使用 Pico-Go 这个插件,文档 -> Pico-Go Quick Start。
然而这个插件在一年半之前就停止维护了,现在去 google “pico go command not found” 可以找到一堆相关的回答。
这个插件在当前的 vscode 版本下已经跑不起来了,在插件市场也下架了。
仓库 -> https://github.com/cpwood/Pico-Go
我摸索了一下午,最终在我的 vscode 上跑起来了。
Version: 1.69.0 (Universal)
Commit: 92d25e35d9bf1a6b16f7d0758f25d48ace11e5b9
Date: 2022-07-07T05:28:41.511Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Darwin x64 21.5.0
构建
pico-go 使用了 serialport 来访问 usb 设备,这包含了更底层的能力,是一个 node cpp 模块。
作者使用了另一个仓库 cpwood/Bindings-Builder,来手动指定 vscode、electron 以及对应的 module 版本,然后通过 github action 触发构建,并自动推送到 Pico-Go 的仓库。
你需要阅读一下用于自动构建的仓库的 README,然后 fork 我的仓库 Drincann/Bindings-Builder,并关注 这个 commit,看我是如何修改构建流程的。
关于版本信息:

过程中,你还需要 fork 一份作者的 Pico-Go。
当自动构建流程结束后,对应的构建结果会被推送到 Pico-Go 的 develop 分支。
我们把 Pico-Go 拉到本地,开始手动构建 vscode 插件:
安装插件构建工具:
npm -g vsce
构建:
npm i && npm run build && npm run copy-native && vsce package
安装插件:
code --install-extension pico-go-1.4.3.vsix
你也可以直接使用我的 Pico-Go fork 进行构建,注意 native_modules 下是否有对应 vscode 版本对应 node 版本的 node module version。
可以联系我构建其他版本的插件。
边栏推荐
猜你喜欢

Can communication (1) - physical layer of CAN communication

Codeforces Round #806 (Div. 4) A - G

华为路由器:多区域OSPF协议实验

Timeline和Playable导致Unity崩溃问题记录

透视北交所100家上市公司:中年理工男的新世界

迪赛智慧数——折(渐变堆叠图):全国居民人均可支配收入

Codeforces Round #804 A The Third Three Number Problem

C language custom type (struct, bit segment, enumeration, Union)

Codeforces Round #804 C The Third Problem

君乐宝要IPO了,资本却笑不出来
随机推荐
Network address translation
华为云服务器云数据库创建只读过程
liquibase初次使用
Stm32f030 is stuck with timer interrupt
svg loading动画
5-Redis架构设计到使用场景-存储原理-数据类型底层结构
Codeforces Round #802 B. Palindromic Numbers
Is it really safe for Huatai Securities to open an account?
Can SQL also play AI? you 're right! Mlops meetup V3 review openmlbd+sqlflow+byzer
Codeforces Round #802 A. Optimal Path
160_技巧_Power BI 新函数-计算工作日天数
Codeforces Round #802 C. Helping the Nature
LeetCode-62-不同路径
LeetCode-240-搜索二维矩阵Ⅱ
Unity Shader——CGInclude文件cginc
6-Redis架构设计到使用场景-持久化机制、缓存失效策略、缓存命中率
功能、模块质量和非功能性测试
Leetcode-128-longest continuous sequence
Codeforces Global Round 21 A. NIT orz!
AIRIOT答疑第4期|如何使用數據分析引擎?