Index

Symbols

[] (brackets), displaying, 62

<> brackets, yotta command line, 85

Numbers

3V header pin, 94

16 KB of RAM, 22

32-bit machine, 21

A

“A” and “B” patterns, 11

A button, counting presses, 13

accelerometer

described, 19

features, 54

G-force gestures, 5455

movement and axes, 54

REPL function, 57

X-, Y-, and Z-axes, 54

accessories, 710

alligator clips, 9192

analog effects, producing, 9899

animating images, 5152

apps. See third-party apps

Arduino IDE, 38

ARM Cortex processor, 4

ARM CPU, 2021

ARM processor, 2628

arm-none-eabi-gcc compiler, 84

arrows, 67

B

Baker, Howard, 145147, 150

banana plugs, 92

battery pack, 1718

BBC (British Broadcasting Corporation), Make It Digital Initiative, 4

BBC micro:bit

features, 4

story of, 145151

BLE (Bluetooth Low-Energy)

antenna, 5, 12, 2224

specification, 110

BLE.cpp file, creating, 114

“blinky” program, 7677

Blocks Editor

categories and functions, 155

completed program, 157

environment, 6

features, 153154

Radio pieces, 155

scripts, 154

show leds piece, 156158

on start piece, 156157

while() loop, 156

Bluetooth. See also UART and Bluetooth

client attributes and services, 119120

cloning HelloWorld.cpp, 114

compiler, 113

connecting to micro:bit, 118

detecting button presses, 121

“Draw a circle” message, 117

GATT_TABLE, 117

importing programs, 114

initializing on micro:bit, 115

mbed operating system, 113

memory, 115116

micro:bit program, 113

MicroBitConfig.h file, 116

naming board, 120

overview, 109110

pairing experiments, 111

pairing micro:bit to phone, 117118

pairing process, 119

processor, 20

reading from thermometer, 122

services, 117

using C++, 111

versus WiFi, 110

writing to display, 122

Bluetooth Smart protocol, 22

boards

flashing, 17

processors, 12

procuring, 7

resetting, 17

Boolean conditional, 55

bot platform. See micro:bot

brackets ([]), displaying, 62

brightness, LEDs, 98

BTN_* header pins, 94

buttons, features, 5253

C

C++, 70, 7475, 8788, 111

calibrate() function, compass, 5758

cell phone, growth, 3

“CHASE THE DOT” message, 11

Check button, 46

check mark, displaying, 5657, 65

C.H.I.P., 34

Claessens, Jo, 145

classes, learning about, 74

Classes folder, 7475

clock displays, mu IDE, 48

Code Kingdoms

Add Event button, 161

Basic category, 161

clearing screen, 161

code, 163

Compile button, 1644

“complexity” slider, 159160

control flow blocks, 162

deleting blocks, 163

features, 158

functions, 160161

libraries, 159

main program script, 162

onStart() function, 161

patterns, 161

previewing program, 163

while() loop, 162

workspace, 159

code-completion feature, 3334

coding environments, 29

COL* header pins, 94

compass

board orientation, 5960

functions, 5859

Image.HAPPY, 58

magnitude of magnetic fields, 60

compass/magnetometer, features, 57

CPUs, processing tasks, 27

craps game, 6367

D

default program, 1112. See also programming micro:bit

devices, flashing, 13

dialout group, mu IDE, 36

diamond shape, displaying, 5657

dice rolls, simulating, 6465

DigitalOut document, 75

DIO header pin, 94

display() method, 46

display.show() method, mu IDE, 47

E

edge connector breakout board, 78, 26. See also GPIO (general-purpose input/output) pins

accessing pins in code, 9596

features, 9294

GND post, 97

GPIO header pin descriptions, 94

LED/potentiometer, 9697

multimeter reading, 96

potentiometer’s value, 100

prototyping area, 95

read_analog(), 96101

write_analog(), 9596

write_digital(), 9596

Edge Connector Motor Driver Board, 89

errors. See Check button

Evothings environment, 123124

F

filesystem, 6063

Finder window (Mac), 12

flash memory, 21. See also memory

flashing boards, 17

flashing devices, 13

frown and smile, 5556

functions, availability, 6566

G

games, craps, 6367

GATT_TABLE, Bluetooth, 117, 131

gcc compiler, installing, 81

get_presses() method, mu IDE, 53

G-force gestures, accelerometer, 54

GitHub website, 4243, 55

GND post, edge connector breakout board, 97

GPIO (general-purpose input/output) pins. See also edge connector breakout board

accessing in code, 9596

alligator clips, 9192

banana plugs, 92

features, 1819

location, 5, 25

GPIO header pin descriptions, 94

“GREAT! NOW GET CODING!” message, 11

Groups folder, 74

H

.h extension, 74

Hall, Tony, 151

header pins, 94

heart symbol, 11, 41

“Hello, World!” programs

MicroPython, 31

Microsoft Touch Develop, 168

mu IDE, 41

“HELLO” program, 1011

HelloWorld.cpp, cloning for Bluetooth, 114

help() command, Python programming language, 74

hex files, opening, 13

homebrew package management, 8384

I

I2C (Inter-Integrated Circuit) protocol, 20, 100103

IC (integrated circuit), 18, 20

IDEs (integrated development environments), 29, 33

Image.ARROW, 67

Image.CLOCK2, mu IDE, 48

Image.HAPPY, 58

Image.PACMAN, mu IDE, 4950

images, mu IDE, 4752

import os, performing, 6162

import statements, Python, 74

importing libraries, 64

#include statement, 7475

indenting lines, mu IDE, 62

inputs, buttons as, 5253

Intel Edison, 4

IoT (Internet of Things), 23, 69

J

JavaScript, 153

Jodrell Bank Observatory, 149

K

Kivy tool, 123124

L

LEDs. See also status LED

brightness, 98

flashing, 11

patterns, 12

project, 4552

libraries, importing, 64

lines, indenting, 62

Linux

man pages, 74

yotta customization, 8485

yotta installation, 7980

loops

breaking from, 62

craps game, 66

M

macOS

yotta customization, 82

yotta window, 79

magnetic fields, magnitude, 60

magnetometer, 20, 57

main.cpp program, 7475

Make It Digital initiative, 4

Make It Digital season, 150151

mbed operating system. See also yotta command-line

blinky program, 76

Bluetooth, 113

code examples, 72

Compiler button, 7071

developer account, 7071

device selection, 72

features, 6970

microbit-hello-world program, 7273

writing code, 7071

memory, 6061. Seealso flash memory

micro:bit

back and front, 1516, 2425

connecting to USB port, 10

dimensions, 15

edge connector breakout board, 26

future, 150

input voltage, 15

obtaining, 7

powering, 45

programming, 6

USB micro port, 15

micro:bit app, 112

micro:bit Blue app, 111, 120

MICROBIT device, dragging scripts to, 13

Micro:bit Education Foundation, 145, 150

Micro:bit Foundation, 6

microbit libraries, yotta command-line, 86

microbit module, sleep method, 43

MicroBit object, initializing, 130

microbit-astounding-script.hex file, 13

MicroBitConfig.h file, Bluetooth, 116

microbit-dal

folder and library, 126127

MicroBit.Image object, mu IDE, 50

microbit-samples code, cloning, 126

micro:bot

completing, 135

program, 136143

SPST (single-pole-single-throw) switch, 134

Turtle platform, 134

MicroPython environment

filling in code, 32

Help button, 32

My Scripts icon, 31

screen shot, 7

scripting page, 30

Snippets button, 3132

USB cable, 31

web editor, 3033

Zoom buttons, 33

Microsoft Block Editor environment, 6

Microsoft Touch Develop

events and functions, 167

features, 64

functions, 166

Game button, 166167

Hello, world! 168

interacting with code, 164165

interface, 165

led, 166

libraries, 67

paste, copy, cut, 166

script, 168

snippets, 164165

suggestions, 165

MI:power board, micro:bit, 910

MISO header pin, 94

Molex female connector, 18

MOSI header pin, 94

motor driver board

button pins, 106

features, 103104

input terminal blocks, 107

jumper wires, 104

motor terminals, 105

multimeter, 105107

pin values and motor directions, 106

power supply, 104

using, 104

voltages, 105106

mu IDE

application, 35

Arduino IDE, 38

arrows, 67

breaking from loops, 62

brightness control, 4142

calibrate() function, 5758

Check icon, 43

checking code, 3738

clock displays, 48

compass functions, 5859

craps game, 6467

dialout group, 36

display() method, 46

displaying heart, 41

display.show() method, 47

downloading and installing, 3435

driver, 3435

editor, 37

Files and REPL (Read-Eval-Print Loop), 39

Flash, Files, and REPL (Read-Eval-Print Loop), 38, 42

get_*() commands for compass, 60

get_presses() method, 53

“Hello, World!,” 41

help() command, 40

Help icon, 37

Image.CLOCK2, 48

Image.PACMAN, 4950

images, 4752

importing libraries, 64

indenting lines, 62

light versus dark environments, 37

line of moving dots, 4243

line.hex file, 43

Linux box, 36

“live-programming” feature, 39

microbit module, 43

MicroBit.Image object, 50

New, Load, Save icons, 37

newline, 43

open() function, 62

os.listdir() function, 62

Quit icon, 37

random.seed(), 64

REPL function, 40, 74

scroll() method, 47

show() function, 46

show_roll() function, 65

starting, 36

string assignment, 67

text, 4647

Theme icons, 37

uploading code, 38

was_gesture(), 5556

while loop, 43

while not loops, 6667

window panes, 40

Zoom icons, 37

N

NetBeans local compiler, yotta command line, 8789

newline, mu IDE, 43

NIC (network interface card), 27

nRF Connect for Mobile, Bluetooth, 111

NVIDIA Jetson TK1, 1

O

O’Brien, Tim, 149

open() function, mu IDE, 62

os.listdir() function, mu IDE, 62

OV header pin, 94

P

Pac-Man, 4950

PAD* header pins, 94

Particle Photon, 34

Pi Foundation, 149

Pi Zero, 1

pins. See GPIO (general-purpose input/output) pins; header pins

pip tool, installing, 7980

pixel animation, 52

power ports, 1718

processors, ARM Cortex, 4

program logic, establishing, 74

programming environments

Blocks Editor, 153158

Code Kingdoms, 158164

Microsoft Touch Develop, 164169

programming languages, 29

programming micro:bit, 6. See also default program

programs, adding, 13

pushbuttons, 5253

PWM (pulse width modulation), 9899

Python programming language, 2930

Boolean conditional, 55

functions, 32

help() command, 74

import statements, 74

tuple, 54

R

RAM, 22

random.seed(), mu IDE, 64

Raspberry Pi, 1, 4, 145, 149

read_analog(), edge connector breakout board, 96101

REPL function

accelerometer, 57

mu IDE, 74

reset button, 17

RISC (Reduced Instruction Set Computer), 27

rolling dice, simulating, 6465

S

SBCs (single-board computers), 1, 26

SCK header pin, 94

SCL header pin, 94, 101

scripts, writing, 13

scroll() method, mu IDE, 47

SDA header pin, 94, 101

see text comments, craps game, 66

sensors, 1920, 57

“SHAKE” message, 11

show() function, mu IDE, 46

show_roll() function, mu IDE, 65

sleep method, microbit module, 43

smile and frown, 5556, 58

SoftBank, 28

Sparks, Michael, 145

SPST (single-pole-single-throw) switch, micro:bot, 134

status LED, 17. See also LEDs

Stockdale, Gareth, 145, 148

strings, assigning, 67

Structs folder, 74

T

text, mu IDE, 4647

text editors, 13

third-party apps, 123124

Touch Develop. See Microsoft Touch Develop

tuple, Python programming language, 54

Turtle platform, 134

U

UART and Bluetooth. See also Bluetooth

button events, 130131

disabling security, 131132

disabling whitelist, 132

enabling, 125126

GATT table, 131

hex file, 132

Import Into Computer, 127

Import Library, 127

MicroBitConfig.h file, 131

microbit-dal folder, 126

microbit-samples code, 126

onConnected() function, 130

onConnected()

function, 130

serial communication, 132133

smartphone app, 132

turning off services, 131

UART.cpp file, 128130

Ubuntu. See Linux

USB microcontroller, 18

USB port

connecting to, 10

locating, 15

MicroPython environment, 31

W

websites

Bluetooth, 110

Evothings Studio program, 123

GitHub, 4243

mbed operating system, 70

NetBeans local compiler, 8788

while loop, mu IDE, 43

while not loops, mu IDE, 6667

WiFi, versus Bluetooth, 110

Windows

yotta customization, 8182

yotta interface, 78

Windows Explorer window, 12

Woolley, Martin, 111, 120

write_analog(), edge connector breakout board, 9596

write_digital(), edge connector breakout board, 9596

Y

YES symbol, displaying, 65

yotta command line. See also mbed operating system

<> brackets, 85

/bin subdirectory, 81

customizing, 8085

default answers, 85

executable, 8587

features, 77

Hello, world application, 8587

installing, 7880

local compiler, 8789

main.cpp program, 87

microbit libraries, 86

NetBeans local compiler, 8789

source/ folder, 8687

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.225.173