Skip to content

MakerClassCZ/circuitpython-uploader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircuitPython Uploader

VS Code extension for uploading code and managing libraries on CircuitPython devices.

This extension was created as a tool for MakerClass courses 🎓
Follow me on X (Twitter) for the latest tips and tricks in programming and electronics!
Note: The resources are primarily in Czech language

Features

  • 🚀 Quick Upload - Upload current Python file as code.py (Ctrl+Alt+U)
  • 📁 Upload as Filename - Upload file keeping its original name
  • 🔍 Auto-detection - Automatically find connected CircuitPython devices
  • 📊 Device Info - Shows CircuitPython version and board type with copyable output
  • 📚 Library Management - Auto-install libraries from official bundle
  • 💾 Backups - Automatic backup of existing code.py before overwriting
image

Requirements

  • VS Code 1.74.0 or higher
  • CircuitPython 9.x or 10.x device
  • Internet connection for library bundle download (first use)

Installation

VSIX (Recommended)

  1. Go to Releases
  2. Download the latest .vsix file
  3. Open VS Code → Extensions (Ctrl+Shift+X)
  4. Click "..." → "Install from VSIX..." → Select the file

Manual (Alternative)

  1. Download this repository as ZIP
  2. Extract and rename folder to: makerclass.circuitpython-uploader-1.0.1
  3. Copy to VS Code extensions directory:
    • Windows: %USERPROFILE%\.vscode\extensions\
    • macOS/Linux: ~/.vscode/extensions/
  4. Restart VS Code

Usage

Upload Code

Upload as code.py (default behavior):

  1. Open a Python file
  2. Press Ctrl+Alt+U (Windows/Linux) or Cmd+Alt+U (Mac)
  3. File uploads as code.py to the device

Upload with original filename:

  1. Open a Python file
  2. Use command: CircuitPython: Upload as filename
  3. File keeps its original name (e.g., main.py, sensor_test.py)

Manage Libraries

Fix Libraries - Automatically install all libraries imported in code.py:

  • Command: CircuitPython: Fix Libraries

Upload Library - Install a specific library:

  • Command: CircuitPython: Upload Library
  • Enter library name when prompted

Libraries are downloaded from the official Adafruit bundle and cached for 1 week.

Other Commands

  • CircuitPython: Upload as code.py - Upload file as code.py (default)
  • CircuitPython: Upload as filename - Upload file keeping original name
  • CircuitPython: Auto-detect Device - Find and set device path
  • CircuitPython: Set Device Path - Manually set device path
  • CircuitPython: Show Device Info - Display device information (version, board, path)

Configuration

VS Code settings:

  • circuitpython-uploader.devicePath - Path to CircuitPython device
  • circuitpython-uploader.createBackup - Create backup before upload (default: true)

Version History

v1.0.1

  • ✨ Added "Upload as filename" command to preserve original file names
  • 🔧 Improved backup logic - backups only created when overwriting existing files
  • 🧹 Refactored code to eliminate duplication between upload functions

v1.0.0

  • Initial release with basic upload and library management features

Troubleshooting

  • Bundle not found: Update to CircuitPython 9.x or newer
  • Library not in bundle: Check if it's a built-in module or needs manual installation
  • Clear cache: Delete /tmp/circuitpy-bundle-cache (contains all bundle versions)

License

MIT

About

VS Code extension for CircuitPython development with auto-upload and library management

Topics

Resources

License

Stars

Watchers

Forks