Many people are familiar with Bluetooth Low Energy (BLE) for connecting peripherals such as mice and keyboards or event some headphones or earbuds. However, BLE can do so much more. Did you know you can transfer files over BLE? This is the basis for being able to edit CircuitPython files directly on your device.
Adafruit has been working on a new web-based Code Editor for CircuitPython. This allows you to edit files directly on your Bluetooth devices using just the Chrome web browser without installing any additional software. The great thing about this code editor is it is written completely in JavaScript, so it only runs on your computer and none of your data is ever uploaded to a server.
Last year's guide called Using the Bluefruit Dashboard with Web Bluetooth in Chrome used Web Bluetooth to read sensors on a few of the devices Adafruit offers. This was great for being able to test out all of the sensors on the boards, but the code running on the board was written in Arduino.
With the Code Editor, however, all of the BLE functions are built into CircuitPython itself and so you can have it run any CircuitPython script you would like while still retaining the ability to remotely edit your files.
To get started, all you will need are a Bluetooth board with the nRF52840 chip such as the Circuit Playground Bluefruit, Adafruit CLUE, Feather nRF52840 Express, Feather nRF52840 Sense, BBC micro:bit V2, LED Glasses Driver, or one of a number of other Bluetooth boards that run CircuitPython.
Text editor powered by tinymce.