Note: I've just migrated to a different physical server to run Spivey's Corner,
with a new architecture, a new operating system, a new version of PHP, and an updated version of MediaWiki.
Please let me know if anything needs adjustment! – Mike

Programming the micro:bit

Copyright © 2017–2023 J. M. Spivey
Revision as of 20:05, 10 March 2020 by Mike (talk | contribs) (Created page with "We will program the {{microbit}} on the 'bare metal', allowing us to see (and requiring us to understand) everything about how the hardware works. If we only want to implemen...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

We will program the micro:bit on the 'bare metal', allowing us to see (and requiring us to understand) everything about how the hardware works. If we only want to implement an application, then there's no need to tangle with these low-level details.

  • MBED and C++.
    • MBED brings together a lot of things: every MBED device can be programmed by copying files to a simulated disk drive, and there is an online C++ compiler that can generate an object file suitable for each device.
    • From a programming point of view, MBED provides a hardware abstraction layer that hides the details of the I/O system on each microcontroller behind a uniform interface. There's a layer written in C that manipulates the device registers, and around that are wrappers in C++ that follow the idiom that declaring an instance of a class also initialises the attached hardware.
  • Lancaster runtime: provides threads and an event system.
  • Languages on top: Micropython, Blocks, Javascript.
  • Arduino IDE (also effectively C++) with Adafruit libraries.

Phōs gives us the possibility of building applications as families of interacting lightweight processes.