Appendix A
JavaScript Blocks Recipes
THIS APPENDIX CONTAINS complete code listings for the programs detailed in Chapter 6, ‘JavaScript’, and Chapter 8, ‘The Wireless BBC micro:bit’. These can be entered into the JavaScript Blocks Editor visually. Or, you can enter the alternative versions from Appendix B, ‘JavaScript Recipes’, in JavaScript Mode, and then use the Editor toggle to switch back to JavaScript Blocks Mode (see Chapter 6.)
Chapter 6: Hello, World! (Non-looping)
Chapter 6: Hello, World! (Looping)
Chapter 6: Button Inputs (Single Button)
Chapter 6: Button Inputs (Two Buttons)
Chapter 6: Touch Inputs
Chapter 6: Temperature Sensor (No Formatting)
Chapter 6: Temperature Sensor (with Formatting)
Chapter 6: Compass Sensor
Chapter 6: Accelerometer ...
Get The Official BBC Micro:bit User Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.