Hacker News 中文摘要

RSS订阅

Velxio 2.0 – 在浏览器中模拟Arduino、ESP32和树莓派3 -- Velxio 2.0 – Emulate Arduino, ESP32, and Raspberry Pi 3 in the Browser

文章摘要

Velxio是一款开源的多板卡模拟器,可在浏览器中本地运行,无需硬件或云端支持。它支持19种开发板(包括Arduino、ESP32和树莓派等),涵盖5种CPU架构,提供真实CPU模拟和48+电子元件交互。用户可编写Arduino C++或Python代码,直接编译并在浏览器中模拟运行。

文章总结

Velxio:浏览器中的多开发板模拟器

项目地址velxio.dev
GitHub仓库davidmonterocrespo24/velxio

Velxio 是一款完全本地化、开源的多开发板模拟器,支持在浏览器中编写、编译和运行 Arduino C++ 或 Python 代码,无需硬件设备或云端依赖。它提供真实的 CPU 模拟和 48 种以上交互式电子元件支持。

核心功能

  • 支持19种开发板:涵盖 Arduino Uno、ESP32、ESP32-C3、Raspberry Pi Pico、Raspberry Pi 3 等,兼容5种CPU架构(AVR8、ARM Cortex-M0+、RISC-V、Xtensa LX6/LX7、ARM Cortex-A53)。
  • 全功能代码编辑:基于 Monaco 编辑器,支持语法高亮、自动补全、多文件工作区,并集成 Arduino 编译工具链。
  • 实时模拟
    • AVR8开发板(如Arduino Uno):支持GPIO、USART、ADC、SPI、I2C等功能。
    • RP2040开发板(如Raspberry Pi Pico):提供UART、ADC、PWM等硬件模拟。
    • ESP32/ESP32-S3:通过QEMU实现Xtensa双核模拟,支持WiFi和RMT/NeoPixel。
    • Raspberry Pi 3:运行完整的Raspberry Pi OS,支持Python脚本和多板串口通信。
  • 交互式组件:包含48种电子元件(如LED、电位器、TFT显示屏),支持拖放布局和属性配置。
  • 串口监视器:实时显示输出数据,支持自动波特率检测和输入发送。

部署与使用

  • 在线体验:直接访问 velxio.dev 即可使用。
  • 本地部署:通过Docker一键运行: bash docker run -d -p 3080:80 ghcr.io/davidmonterocrespo24/velxio:master 访问 http://localhost:3080 即可。

技术栈

  • 前端:React + TypeScript + Monaco 编辑器
  • 后端:FastAPI + SQLite
  • 模拟引擎:avr8js(AVR)、rp2040js(RP2040)、QEMU(ESP32/RPi3)、RiscVCore.ts(RISC-V)

开源与许可

  • 许可证:AGPLv3(开源免费),同时提供商业许可选项。
  • 支持项目:可通过 GitHub Sponsors 或 PayPal 赞助。

社区与资源

  • Discord社区加入讨论
  • 文档:详见仓库的 docs/ 目录,包含各开发板的模拟细节和故障排除指南。

Velxio 旨在为开发者提供无硬件的嵌入式开发体验,适用于教育、原型设计和快速验证场景。

评论总结

以下是评论内容的总结:

主要观点

  1. 对项目的积极评价

    • 用户认为这是一个很棒的项目,解决了需要物理设备进行测试的不便。
      "This is a great idea. It’s always been inconvenient requiring access to the physical board just to be able to test these sort of projects."
      "This is fantastic. I am doing my first-ever consumer electronics product and this would save a lot of soldering time."
  2. 功能与实用性

    • 项目支持多种嵌入式开发板,且完全本地化运行,适合教育机构使用。
      "A free, open-source emulator for 19 embedded boards... No cloud dependency. No student accounts."
      "Universities and bootcamps can deploy it on their own servers and give every student access to a complete embedded development environment, for free."
  3. 技术细节与改进建议

    • 用户建议优化启动页面的图片大小以提升加载速度。
      "The main splash screen image is nearly 8MB big. It takes a noticeable time to download on my connection."
    • 用户希望支持MicroPython或CircuitPython。
      "Awesome. Is there any chance of getting MicroPython or CircuitPython support?"
  4. 与其他工具的对比

    • 用户询问与Wokwi的对比,并提到项目基于wokwi-elements。
      "Can someone who has used both wokwi and this do a compare/contrast?"
  5. 使用体验反馈

    • 用户指出编译按钮的交互不够直观。
      "It wasn’t immediately clear that you need to press Compile before Play gets enabled."
    • 用户提到容器启动时下载额外数据的问题。
      "The container instructions has -d in it, but note that after booting the container it downloads another... 300+mb more."
  6. 质疑与批评

    • 有用户表示虽然喜欢这个想法,但不想使用,并质疑其灵感来源。
      "I like this Idea but I don't want to use this. I know what kind of prompt U using to create this one."

总结

评论普遍对Velxio 2.0的功能和本地化特性表示赞赏,认为其实用性强,尤其适合教育场景。同时,用户也提出了一些改进建议,包括优化加载速度、增强交互设计以及扩展语言支持。少数用户对其与其他工具的差异和灵感来源提出了疑问。