BBC micro:bit v2

Questions and discussion about running MicroPython on a micro:bit board.
Target audience: MicroPython users with a micro:bit.
User avatar
rcolistete
Posts: 352
Joined: Thu Dec 31, 2015 3:12 pm
Location: Brazil
Contact:

BBC micro:bit v2

Post by rcolistete » Tue Oct 13, 2020 5:47 pm

BBC micro:bit v2 announced today ! With nRF52833 MCU @ 64 MHz, 128 kB of RAM, built-in microphone and speaker, etc.

See :
- Micro Bit mini-computer gets new update :
https://www.bbc.com/news/technology-54514235
- Meet the new BBC micro:bit - Now with speaker and microphone!
https://microbit.org/new-microbit/
- Announcing the new micro:bit v2 - The second iteration of micro:bit is now available, with new SparkFun kits to go along with it!
https://www.sparkfun.com/news/3414
- Breaking News: Announcing micro:bit V2
https://kitronik.co.uk/blogs/resources/ ... cro-bit-v2
- The Differences Between micro:bit V1 And microbit V2
https://kitronik.co.uk/blogs/resources/ ... ifferences
- micro:bit V2 - Details of the 2.0 micro:bit revision
https://tech.microbit.org/latest-revision/
Table comparing BBC micro:bit v1.x versus v2 :
https://tech.microbit.org/docs/latest-r ... -table.png
Image

MCU nRF52833 :
https://www.nordicsemi.com/Products/Low ... s/nRF52833
has 64 MHz Arm Cortex-M4 with FPU (x 16 MHz Cortex-M0 without FPU - Float Point Unit), 8x of RAM (128 kB x 16 kB), double flash memory (512 kB x 256 kB), 12 bits ADC (x 10 bits) and many other interfaces (SPI, etc) improvements e additional (I2S for sound, etc).

Hope to see 1st class MicroPython support on this new BBC micro:bit v2.

My opinion : with more RAM it will be possible to have MicroPython with full Bluetooth 5.0.
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

User avatar
aivarannamaa
Posts: 171
Joined: Fri Sep 22, 2017 3:19 pm
Location: Estonia
Contact:

Re: BBC micro:bit v2

Post by aivarannamaa » Wed Oct 14, 2020 7:31 am

The new hex is available at https://github.com/bbcmicrobit/PythonEd ... icropython.

Hopefully https://github.com/bbcmicrobit/micropython will be revived as well (Thonny's firmware flasher uses its releases api for finding the suitable latest firmware)
Aivar Annamaa
https://thonny.org

User avatar
rcolistete
Posts: 352
Joined: Thu Dec 31, 2015 3:12 pm
Location: Brazil
Contact:

Re: BBC micro:bit v2

Post by rcolistete » Sun Oct 18, 2020 8:23 pm

MicroPython being developed for BBC micro:bit v2 :
micropython-microbit-v2 - Temporary home for MicroPython for micro:bit v2 as we stablise it before pushing upstream
https://github.com/microbit-foundation/ ... icrobit-v2

Some details about programming platforms for BBC micro:bit v2 :
https://tech.microbit.org/latest-revision/editors/
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

nrD
Posts: 7
Joined: Wed Oct 21, 2020 12:30 am

Re: BBC micro:bit v2

Post by nrD » Wed Oct 21, 2020 12:35 am

So is this new port going to be inline with the standardization for other platforms?

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: BBC micro:bit v2

Post by jimmo » Wed Oct 21, 2020 3:12 am

nrD wrote:
Wed Oct 21, 2020 12:35 am
So is this new port going to be inline with the standardization for other platforms?
Could you please explain what you mean by "the standardization for other platforms" ?

One of the big goals of micro:bit v2 is backwards compatibility with v1. So the Python APIs will look exactly the same, the microbit, radio, speech, music modules, etc. Although v2 will use MicroPython v1.13 and v1 will continue to use v1.9.

If you want to use upstream MicroPython, just like with micro:bit v1, the nRF port in the upstream repo can be used (and the nRF52840 MCU is already supported).

nrD
Posts: 7
Joined: Wed Oct 21, 2020 12:30 am

Re: BBC micro:bit v2

Post by nrD » Thu Oct 22, 2020 2:42 am

Ok can you enumerate some of the differences between the way it will work for nrf52840 upstream vs microbit?

What are some functions that are different compared to the docs here: https://docs.micropython.org/en/latest/

Will interrupts and timers be exposed? As someone who works with high schools, I want to move from arduino so that I can expose students to an event-based or interrupt-based model.

nrD
Posts: 7
Joined: Wed Oct 21, 2020 12:30 am

Re: BBC micro:bit v2

Post by nrD » Thu Oct 22, 2020 2:46 am

For example, machine pin class vs microbit pins

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: BBC micro:bit v2

Post by jimmo » Thu Oct 22, 2020 6:32 am

nrD wrote:
Thu Oct 22, 2020 2:42 am
Ok can you enumerate some of the differences between the way it will work for nrf52840 upstream vs microbit?

What are some functions that are different compared to the docs here: https://docs.micropython.org/en/latest/

Will interrupts and timers be exposed? As someone who works with high schools, I want to move from arduino so that I can expose students to an event-based or interrupt-based model.
The upstream nRF port is the one that the docs you linked to are for. There are some quirks in the nRF port, and it's a little bit less stable generally than the STM32 and ESP32 ports, but yes, timers, interrupts, etc. It's based around the machine module.

Nobody has created a board definition for micro:bit v2 yet, but that won't be terribly difficult. With the v1 board definition, some of the "microbit" module features were also added (display, etc).

I agree though - this was a big source of frustration for me when teaching micro:bit in high school too. I'm disappointed that the "primary" v2 MicroPython port isn't upstream MicroPython, but I understand the micro:bit foundation were very keen on maintaining backwards compatibility.

User avatar
rcolistete
Posts: 352
Joined: Thu Dec 31, 2015 3:12 pm
Location: Brazil
Contact:

Re: BBC micro:bit v2

Post by rcolistete » Thu Oct 22, 2020 4:15 pm

I think that the community can help develop a nRF MicroPython port for BBC micro:bit v2 with full Bluetooth support, interrupts, timers, etc.
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: BBC micro:bit v2

Post by jimmo » Thu Oct 22, 2020 11:57 pm

rcolistete wrote:
Thu Oct 22, 2020 4:15 pm
I think that the community can help develop a nRF MicroPython port for BBC micro:bit v2 with full Bluetooth support, interrupts, timers, etc.
Yep. I hope so.

It would be also good to investigate the capabilities of the DAPLink chip on the v2... now that it's connected via I2C to the nRF (in addition to UART, where the the v1 only had the UART), I wonder what the possibilities are for doing USB device emulation (HID, MIDI, etc).

The other area that makes me excited about a more fully-featured upstream port is asyncio. While we're still a little way away from doing things like "await pin.rising_edge()" it's in the pipeline, and would be tremendously useful for micro:bit projects.

Post Reply