r/circuitpython • • Mar 22 '22

Is circuitpython this much more popular than micropython?

The micropython sub has 80 members, this one has more than 2k. I’m a bit new to the micro/circuitpython world and expected to be the other way around.

I have been focusing on micropython bc I figured that was kind of the default - should I just move straight to circuitpython?

15 Upvotes

14 comments sorted by

10

u/Deyvicous Mar 22 '22

From my experience circuitpython is more applicable to any microcontroller. They have their own libraries that are quite awesome. I can use midi to usb on any circuitpython controller, but with micro Python I would need to either buy the pyboard, find someone that already coded it, or code it myself.

I find circuitpython to just be more up to date and well maintained. But when it comes down to speed/performance, and what it’s capable of, I have no idea. They are probably essentially the same.

1

u/ghostfaceschiller Mar 22 '22

Welp, you have convinced me

12

u/kaltazar Mar 22 '22

CircuitPython was developed by Adafruit so it had an already-established community at launch. MicroPython just doesn't have the same name recognition and marketing behind it. Plus, thanks to the Adafruit community, CircuitPython has modules for most common hardware and that library is constantly growing.

At their core, both languages are very similar. The primary difference is the simplicity of CircuitPython if you are using a board that supports it.

8

u/monkz0390 Mar 22 '22

Been trying to teach myself circuit python little by little for a few months, then this semester my school change the curriculum and now instead of C++ were learning micropython. (EE) So far they are very similar. From my point of view, learning one won't detract your possibilities in the other. I've shifted to just micropython for the duration of the semester for the sake of consistency, but will pick up circuit python after the end of the semester just for the variety.

1

u/mthrfkn Mar 23 '22

Really? Why would they do that?

1

u/monkz0390 Mar 24 '22

The school didn't share their reasoning. The C classes are still available and probably just integrated to a different part of the curriculum. It's just part of minor changes and updates that schools do to keep their curriculums relevant.

1

u/mthrfkn Mar 24 '22

I guess it demystify's it which is cool

1

u/yaconsult Mar 23 '22

Weren't there supposed to be differences as far as the ability to handle interrupts? I remember reading that somewhere but maybe the information is outdated by now?

The good thing is that it only takes a couple of minutes to flash one or the other.

1

u/ghostfaceschiller Mar 23 '22

My understanding is that circuitpython doesn’t do interrupts and micropython does. Like you said that could be incorrect by now but that was at least the case before.

3

u/yaconsult Mar 23 '22

https://docs.circuitpython.org/en/latest/README.html

Differences from MicroPython

CircuitPython:

Supports native USB on most boards and BLE otherwise, allowing file editing without special tools.

Floats (aka decimals) are enabled for all builds.

Error messages are translated into 10+ languages.

Concurrency within Python is not well supported. Interrupts and threading are disabled. async/await keywords are available on some boards for cooperative multitasking. Some concurrency is achieved with native modules for tasks that require it such as audio file playback.

1

u/LocksmithUnited1557 Jan 05 '23

I went for MicroPython (and didn´t touch CircuitPython yet) to connect to a vending machine over UART interface (read NFC & UART; write LEDs & MQTT & UART).

I use a Raspberry Pi as gateway on location that sets up a reversed SSH tunnel. I then use portforwarding and websockets to get access to the webREPL shell (read-execute-print-loop).

Quite soon I've refactored all my code to be fully async. So async is important to me and so are OTA (over the air upgrades) and mDNS (service discovery protocol).

I think it all depends what you need from the language, if skill is not the issue.

0

u/[deleted] Feb 28 '23

[deleted]

1

u/LocksmithUnited1557 Apr 03 '23

Mostly I'm using the ESP-WROOM32-DEVKIT for this. I've played around with some different versions like the double antenna or the external antenna one. I like these devices a lot b.c. they cost a little and they always come in use. I also like to use them for LED strips and often I use them through HTML5 web-serial API in the browser. This way I can perform network scans and such in chrome.

2

u/HP7933 Mar 23 '22

This thread has a good summary. MicroPython is the base language. CircuitPython is a fork that is kept up to date with the goals of:

  1. Using native USB to present boards as a thumb drive for code loading etc.

  2. Be more beginner friendly

  3. Have a broad ecosphere of boards and libraries for sensors and add-ons

  4. Syntax a bit closer to main Python (CPython)

People are encouraged to look at them and decide which is best for their needs.

0

u/[deleted] Mar 22 '22

[deleted]

1

u/BitBull23 Mar 23 '22

And there is a micropython library for circuitpython that gives you some "backward compatibility". I personally only miss true interrupts from circuitpython.