Presentation is loading. Please wait.

Presentation is loading. Please wait.

The BBC micro:bit and Microsoft Touch Develop

Similar presentations


Presentation on theme: "The BBC micro:bit and Microsoft Touch Develop"— Presentation transcript:

1 The BBC micro:bit and Microsoft Touch Develop
I’ll describe the technology stack we created in partnership with ARM and Lancaster University to make it simple for students to get started coding with micro:bit from a web browser, and then uncover the complexity that lies underneath in the micro:bit’s C++ runtime. The Block Editor provides an introduction to structured programming via blocks that can be snapped together. Touch Develop introduces a statically-typed scripting language with syntax-directed editor. Browser-based compilers from the Block Editor to Touch Develop and from Touch Develop to C++ automate the transition from a visual language to a text-based language, and then to C++, the language of the mbed-based micro:bit. For more information: see and  Tom Ball, Peli de Halleux, Michał Moskal, Jonathan Protzenko Microsoft Research

2 Globally Emerging recognition that K-12 Computer Science is Educationally foundational, like science, mathematics Economically crucial, and not just for geeks USA, Malaysia, Korea, Japan, Sweden, Canada, Germany, Hungary, Israel, Holland, Denmark, Estonia, New Zealand... it's going to happen! England Every child will learn computer science from primary (age 6) onwards A crucial laboratory

3 Vision Positioning The UK journey
Educational not instrumental: Not just a vocational/economic imperative Ideas, not technology Not even primarily about computers! Discipline, not skill In particular, not just coding! Computer science is a foundational subject discipline, like maths and natural science that every child should learn from primary school onwards

4 Depth engagement MSR launches Computing at School (2007)
The UK journey Depth engagement Vibrant grass roots movement: teachers, professionals, academics. Community of practice, to support, encourage, equip, give vision to innovative computing teachers Independent: speaks for the subject, not for teachers, or academics, or companies, or govt. The Big Society: works with dozens of other groups of enthusiasts: Raspberry Pi, Code Club, Codecademy, code.org, cs4fn, Apps for Good, Sonic Pi, etc MSR launches Computing at School (2007) Gift economy: 3,000 resources available for free.

5 20,000 members Growing at 500/month About 3/4 teachers
Both primary and secondary A community A gift economy UK-centric, but open to international members 20,000 members Growing at 500/month

6 163 CAS Hubs In-person meetings of classroom teachers, university academics, software professionals Small, informal, welcoming, supportive

7 Started Sept 2014 in England

8 Engagement at scale Challenge The UK journey
An entirely new subject at school 3,500 secondary schools 17,000 primary schools 200,000+ teachers Virtually no qualified teachers Teachers hungry for support Government explicitly standing back, inviting others to lead Challenge

9 Vision: repeat the "BBC Micro" impact
Vision: repeat the "BBC Micro" impact. From the classroom to the kitchen table A year-long campaign across all of BBC broadcasting A million devices, one for each 12-year old

10 What is the BBC micro:bit?
a small personal coding device an exciting intro to coding and making for students an IoT “starter” kit The BBC micro:bit is a small wearable and programmable mbed-based device that visibly features a 5x5 LED display, accelerometer, compass, buttons, I/O pins, Micro USB plug, Bluetooth Low Energy antenna, ARM Cortex-M0 processor, and battery plug. Just like Arduino, the micro:bit can be connected to and interact with sensors, displays, and other devices. The first wave of micro:bits will land in UK schools this autumn, with every Year 7 student in the UK receiving a micro:bit, for free.

11 25 red LEDs to light up, flash messages, create games and invent digital stories
Two programmable buttons activated when pressed. Use the micro:bit as a games controller. Pause or skip songs on a playlist. On-board motion detector or 'accelerometer' that can detect movement and tell other devices you’re on the go. Featured actions include shake, tilt and freefall. Turn the micro:bit into a spirit level. Light it up when something is moved. Use it for motion-activated games. A built-in compass or 'magnetometer' to sense which direction you’re facing, your movement in degrees, and where you are. Includes an in-built magnet, and can sense certain types of metal.  Bluetooth Smart Technology to connect to the internet and interact with the world around you. Connect the micro:bit to other micro:bits, devices, kits, phones, tablets, cameras and everyday objects all around. Share creations or join forces to create multi-micro:bit masterpieces. Take a selfie. Pause a DVD or control your playlist.   Five Input and Output (I/O) rings to connect the micro:bit to devices or sensors using crocodile clips or 4mm banana plugs. Use the micro:bit to send commands to and from the rings, to power devices like robots and motors.

12 What makes the BBC micro:bit unique?
Small and attractive low geek factor appeals across ages, genders Inexpensive and simple to produce/embed wiring micro:bit to sensors, other micro:bits, … an affordable embedded controller Connectivity via I/O pins and Bluetooth LE BLE to smartphones, tablets, PCs and through these hubs, the cloud

13 Some “interesting” constraints
ARM Cortex M0 256K Flash (for program and static data) 16k RAM (for stack and heap) Bluetooth Low Energy (BLE) stack Support both flashing with USB and “over the air” with BLE

14 Goals for the BBC micro:bit
a browser-based programming experience a choice of languages and programming experiences an layered architecture that supports progression content to support teachers in the classroom

15 Demo

16 Goals for the BBC micro:bit
a browser-based no-install experience a choice of languages, programming experiences, platforms an layered architecture that supports progression content to support teachers in the classroom

17 The technology stack PL OS HDW www.touchdevelop.com
edit/run/simulate/compile C++ micro:bit runtime mbed platform, SDK OS A main challenge we faced in this project was to make it simple for any student, regardless of experience, to successfully program the micro:bit. We addressed this challenge through a technical partnership with Lancaster University and ARM. Together, we provide a path from the browser-based TouchDevelop scripting environment down to safe and efficient C++, the supported language of ARM’s mbed platform. HDW

18 a statically-typed language and libraries
Touch Develop is… 1 2 a cloud of scripts, users a browser-based IDE, for mobile devices a statically-typed language and libraries 3 4

19 Choice

20 Choice Block Editor Touch Develop Drag and drop No syntax errors
All variables are global No types Cursor-based editing Few syntax errors Global and local variables Static types

21 Some of the micro:bit APIs
Basic show number show string show animation LED direct manipulation of display (plot, unplot, point) Image creation of “sprites” and “sprite sheets” Input event-based and polling buttons, accelerometer, compass Pins analog/digital read/write pitch Game simple game Events for BLE

22 ARM runtime (precompiled)
USB Web browser 1 Block Editor script User edits script and compiles Compile TouchDevelop Block Editor 1 Touch Develop script Drive C++ micro:bit runtime Compile Touch Develop ARM 3 User copies ARM binary to micro:bit drive Compile ARM mbed C++ SDK C++ ARM machine code After programming a TouchDevelop script in the browser, the user can request compilation to an ARM binary. The TouchDevelop to C++. The second compilation happens in the cloud, where the generated C++ is compiled and linked with the C++ runtime, producing an ARM binary sent back to the user. ARM runtime (precompiled) ARM binary User accepts “download” of ARM binary 2

23 Programming progression
Tile-Based Programming Block-Based Simplified Language Lang. & IDE Full Language & IDE Kodu / Spark Touch Develop Small Basic Visual Studio micro:bit Kodu AGE PROGRESSION

24 The technology stack PL OS HDW www.touchdevelop.com
edit/run/simulate/compile C++ micro:bit runtime mbed platform, SDK OS A main challenge we faced in this project was to make it simple for any student, regardless of experience, to successfully program the micro:bit. We addressed this challenge through a technical partnership with Lancaster University and ARM. Together, we provide a path from the browser-based TouchDevelop scripting environment down to safe and efficient C++, the supported language of ARM’s mbed platform. HDW

25 ARM’s mbed platform http://developer.mbed.org/
mbed-compatible board appears as mounted drive when connected via USB Copy hex file to drive to flash it choice of Windows, MacOs, ChromeBooks, Linux no installation needed Free, web-based development environment Compile C++ to hex file using armcc or gcc mbed SDK is open source under Apache 2.0

26 User codes TouchDevelop script and presses “compile” button
Web browser User codes TouchDevelop script and presses “compile” button TouchDevelop script 1 USB Drive Compiler 1 TouchDevelop C++ C++ program ARM binary User copies ARM binary to micro:bit drive 3 Compiler 2 C++ After programming a TouchDevelop script in the browser, the user can request compilation to an ARM binary. The TouchDevelop to C++. The second compilation happens in the cloud, where the generated C++ is compiled and linked with the C++ runtime, producing an ARM binary sent back to the user. mbed C++ SDK 2 ARM User accepts download of ARM binary mbed compile service ARM binary program

27 BB micro:bit – the C++ runtime
Provides a Device Abstraction Layer (OS) for micro:bit hardware components simple message bus and events co-routines (fibers) and non-preemptive scheduler display driver high-level helper functions (scroll string) a few managed types (reference counted) To be open sourced (currently private) at

28 The technology stack PL OS HDW www.touchdevelop.com
edit/run/simulate/compile C++ micro:bit runtime mbed platform, SDK OS A main challenge we faced in this project was to make it simple for any student, regardless of experience, to successfully program the micro:bit. We addressed this challenge through a technical partnership with Lancaster University and ARM. Together, we provide a path from the browser-based TouchDevelop scripting environment down to safe and efficient C++, the supported language of ARM’s mbed platform. HDW

29 Control and Coordination
MicroBitDisplay represents the LED matrix array of the device MicroBitButton represents a single, generic button MicroBitMultiButton represents a virtual button MicroBitCompass represents an implementation of the Freescale MAG3110 I2C Magnetometer MicroBit represents the micro:bit device as a whole and its various components MicroBitComponent abstract representation of a hardware component the functions needed to drive/poll that hardware MicroBitEvent an event generated by some MicroBitComponent MicroBitMessageBus delivers asynchronous MicroBitEvents via a send/listen pattern Fiber a lightweight representation of a cooperative thread of execution (i.e., a co-routine)

30 More Classes MicroBitSerial MicroBitIO MicroBitI2C
a subclass of mbed’s Serial that accepts micro:bit specific data types MicroBitIO a representation of all given I/O pins on the edge connector MicroBitI2C indirect access to mbed I2C MicroBitEventService provides a BLE gateway for sending MicroBitEvents to the MicroBitMessageBus MicroBitDFUService represents a Device Firmware Update (DFU) loader that provides a simple mechanism to identify an individual micro:bit amongst a classroom of others allows BLE devices to discover and cache a passcode that can be used to flash the device over BLE provides a BLE escape route for programs that 'brick' the micro:bit

31 BBC micro:bit content Quick Start Guide for Teachers
Distributed to 20,000+ teachers 40+ online lessons Lesson = Activity + Quiz + Challenges Mapped to UK CS curriculum Printable

32 Questions?


Download ppt "The BBC micro:bit and Microsoft Touch Develop"

Similar presentations


Ads by Google