What's the difference between CircuitPython and MicroPython

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
pierrot10
 
Posts: 349
Joined: Tue Nov 17, 2015 4:34 pm

What's the difference between CircuitPython and MicroPython

Post by pierrot10 »

Hi,
I am new with CircuitPython and I am planning to rewrite my C++ code to Python (LoRaWAN devices).
I understand that python is for the desktop and CircuitPython is for embedded system and it support Hardware.
I first heart about MicroPython and I have the Circuit Playground express board and I plan starting CircuitPython with that board.

I red
In Micro Python, you can have different files running at the same time and sharing the same state. Where in Circuit Python there's no sharing of States
Does the SAMD21 MO (Adafruit Feather M0 RFM95) board support MicroPython?
Why should I use CircuitPython instead of MicroPython?
How can I see the difference between a script written in Python, MicroPython and CircuitPython?

I wrote a Python script for a Reaspberry board with the goal to measure the particular matter (PM2.5 and PM10) and CO2 over LoRaWAN, could it be compatible with a SAMD21 MO board?

Many thankd for your clarification and have a nice week-end

User avatar
Franklin97355
 
Posts: 23902
Joined: Mon Apr 21, 2008 2:33 pm

Re: What's the difference between CircuitPython and MicroPython

Post by Franklin97355 »

Check with the micro python site and if it has a download then it is supported. You will have to check with Micro Python if you have compiler questions though.

User avatar
danhalbert
 
Posts: 4613
Joined: Tue Aug 08, 2017 12:37 pm

Re: What's the difference between CircuitPython and MicroPython

Post by danhalbert »

CircuitPython is of course well supported on the Adafruit boards you mention.

CircuitPython is a friendly fork of MicroPython. The base language implementation is largely the same. The native modules for dealing with on-chip peripherals have different API's. CircuitPython has tried to emphasize a uniform API across multiple chip families; MicroPython may provide more detailed access to chip-specific hardware features at the expense of compatibility. CircuitPython is oriented toward the beginning user, though it has plenty of features. MicroPython tends to assume more experienced programmers.

The RFM Featherboards you mention were designed before CircuitPython existed. The SAMD21 chips used have limited RAM, which makes it hard to write larger programs. The RFM Feather boards also do not have external on-board flash chips, so the CIRCUITPY filesystem is extremely limited in size.

You are better off considering using a more powerful Feather board, such as Feather RP2040, with the RFM FeatherWings. Feather RP204's with on-board RFM modules are under development, but are not available at this moment.
In Micro Python, you can have different files running at the same time and sharing the same state. Where in Circuit Python there's no sharing of States
This is a somewhat confusing and oversimplified statement. MicroPython has thread support; CircuitPython does not. Both support asyncio for cooperative multitasking.

User avatar
tannewt
 
Posts: 3298
Joined: Thu Oct 06, 2016 8:48 pm

Re: What's the difference between CircuitPython and MicroPython

Post by tannewt »

A longer list of differences is in the CircuitPython README.

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”