5 ms·
How does it compare with MicroPython? In any case, can be good for PoC or similar things where your microcontroller is largely oversized for the application, b
by ale42 4y ago
How does it compare with MicroPython?
In any case, can be good for PoC or similar things where your microcontroller is largely oversized for the application, but in practice you hardly can exploit your microcontroller's power using such a non-compiled high-level language. For a hobby project you can get a microcontroller that has 10x the actual power you need and use Python on it, but on an industrial scale it's not justifiable. 8-bit microcontrollers are still around for some reason...
- traverseda 4y agoBeing able to load extensions at run-time could be a pretty big advantage. Have "apps" you can install on the micro-controller. >but in practice you hardly can exploit your microcontroller's power using such a non-compiled high-level language With micropython you can mark a function to be compiled, or even write a function as inline-assembly. Like normal python develop quickly and optimize the expensive parts. Micropython makes it quite easy to optimize the expensive parts with the viper code emitter and inline-assembly options.
- cozzyd 4y agoIt can "work" on smaller microcontrollers (where "work" means you have to constantly restart the microcontroller because you run out of RAM...)
- tssva 4y agoFrom the top of the webpage, "CircuitPython is a programming language designed to simplify experimenting and learning to code on low-cost microcontroller boards." It targets beginner hobbyists and the lower grade education market. The changes from MicroPython are designed to make getting code on to the board and executing easier for those users. When a microcontroller board with CircuitPython is connected to a computer it appears as a USB drive. To install your code and any supporting files on the board you just drag and drop them on the drive vs having to upload them using something like Thonny with MicroPython. Also when you drop your code on the drive the board automatically resets and begins executing the code. It also has some changes to make code more portable across the different microcontroller boards it supports.
- skybrian 4y agoOn the other hand, with a Raspberry Pi Pico board selling for $4 and the chip going for <$1 in bulk, I'm guessing that for small-scale manufacturing, going cheaper isn't worth the hassle? It depends what the market is.
- thamer 4y agoCircuitPython is a fork of MicroPython, and they periodically bring in commits from MicroPython to stay up to date. One advantage of CircuitPython is that your board gets mounted as a volume like a USB drive, and you can just copy code.py onto it to install your program; it's just a more user-friendly experience. For comparison MicroPython only exposes a file system through a tool called rshell[1], that you need to use to copy code over. CircuitPython also seems to have a lot more libraries due to Adafruit's investment in this ecosystem, although I suspect that most of them could easily be adapted to work with both. [1] https://github.com/dhylands/rshell https://github.com/dhylands/rshell
- comfydragon 4y agoVarious MicroPython implementations, specifically the STM32 port (which runs the PyBoard), expose their filesystem as a USB mass storage device that you can copy files into directly. So I wouldn't say that it's exclusive to CircuitPython by any stretch.
- matt_trentini 4y agoRShell is a nice tool but the 'official' way to interact with a MicroPython device is with mpremote [1]. One of the key features of mpremote is that it allows folders to be mounted on your device from your PC. For me, this allows a workflow that's even more efficient than using USB since no copying is required at all. Work on your PC (often using the unix port in a container [2] to test), then mount the folder and execute on the device. Brilliant. :) I should probably write up how I use this workflow..! It would be good to also allow USB volume mounting on more MicroPython ports (stm32 only) as - I agree - it's more intuitive for beginners. But LittleFS [3] is a much more robust filesystem than FAT, which is required for USB mounting. LittleFS is preferred by the core team and has had more focus recently. [1] https://docs.micropython.org/en/latest/reference/mpremote.html https://docs.micropython.org/en/latest/reference/mpremote.ht... [2] https://hub.docker.com/u/micropython https://hub.docker.com/u/micropython [3] https://github.com/littlefs-project/littlefs https://github.com/littlefs-project/littlefs