Index

Please note that index links point to page beginnings from the print edition. Locations are approximate in e-readers, and you may need to page down one or more times after clicking a link to get to the indexed material.

Page numbers followed by f and t refer to figures and tables, respectively.

A

algorithms, 16–17

See also specific missions

AND statements, 133

APIs, 229

arcade buttons, 158–161

arrays, 219, 239

B

BBC micro:bit. See micro:bit

Bike Indicator, 201

algorithm, 202

build, 202–203

in Circuit Playground Express, 209

code, 204–208

debugging, 208

expert level, 209

in micro:bit, 204–209

blocks

deleting, 8

starting, 6

Boolean variables, 126

breadboard, setup, 160

bugs, defined, 18

builds, 17

See also specific missions

C

Circuit Playground Classic, 2

Circuit Playground Express

Bike Indicator, 209

Cookie Jar Protector, 138–141

Door Sensor to Tell When Your Room Is Under Attack, 115–116

Floor Mat Alarm, 180–181

general information, 1

Light Sensor to Detect Vampire Zombies, 54–56

Light-Up Attack Sword, 86–90

Light-Up Backpack, 68–74

Lock to Protect Your Sword, 128–132

Mobile Alarm for Your Devices, 170–173

Moisture Sensor for Your Plants, 215–217

Name Badge to Identify Valid Family Members, 106–108

Number Lock for Your Devices, 151–157

overview, 2–3

pins, 3

Reaction Game to Test for Zombies, 97–98

Step Counter, 199

Temperature Monitor, 224–228

Treasure Box Alarm, 188–191

Window Alarm, 242–245

Zombie Detector, 29–30

Zombie Escape Sign, 39–40

code

downloads, 8–9

See also specific missions

comments, 42

Cookie Jar Protector

algorithm, 133

build, 134

in Circuit Playground Express, 138–141

code, 134–137, 138–140

debugging, 137–138, 141

expert level, 138, 141

in micro:bit, 134–138

Cron, 120

D

debugging, 18

how to, 19

See also specific missions

Door Sensor to Tell When Your Room Is Under Attack

algorithm, 109

build, 109–111, 117–118

in Circuit Playground Express, 115–116

code, 112–113, 115, 118–121

debugging, 113–114, 116, 121

expert level, 114–115, 116, 121

in micro:bit, 112–115

in Raspberry Pi, 117–121

downloading code, 8–9

downloading libraries, 31

E

expert level, 18

See also specific missions

F

Floor Mat Alarm

algorithm, 177

build, 177–179, 180, 181–182

in Circuit Playground Express, 180–181

code, 179, 180, 182–183

debugging, 180–181, 183

expert level, 179, 181, 183

in micro:bit, 179

in Raspberry Pi, 181–183

for loops, 76

functions, 44–46, 247

H

“Hello World” program

algorithm, 16–17

build, 17

challenge, 18

code, 18

debugging, 18

expert level, 18

with MakeCode, 6–8

with Raspberry Pi, 12–16

Hopper, Grace, 18

I

importing libraries, 33

L

libraries

downloading, 31

importing, 33

NeoPixel library, 64–66

turtle library, 41

Library MakeCode, 64

Light Sensor to Detect Vampire Zombies

algorithm, 51

build, 52, 54

in Circuit Playground Express, 54–56

code, 53, 55

debugging, 53, 56

expert level, 53–54, 56

in micro:bit, 52–54

Light-Up Attack Sword

algorithm, 75–76

build, 76–81, 86

in Circuit Playground Express, 86–90

code, 81–85, 86–89

debugging, 85, 90

expert level, 85, 90

in micro:bit, 79–85

Light-Up Backpack

algorithm, 57

build, 57–59, 60–66, 68–69

in Circuit Playground Express, 68–74

code, 63, 70–72

debugging, 66–67, 72–74

expert level, 67, 74

in micro:bit, 60–67

Linux, 1

lists, 162

Lock to Protect Your Sword

algorithm, 123

build, 128

in Circuit Playground Express, 128–132

code, 129–131

debugging, 128, 131

expert level, 128, 132

in micro:bit, 124–128

M

MakeCode

arrays, 219

blocks, 6, 8

common mistakes, 19–20

debugging code, 8–9

downloading code, 8–9

general information, 1, 2, 3

Library MakeCode, 64

NeoPixel library, 64–66

overview, 4

platform, 5–6

projects, 5

simulators, 8–9

your first program using, 6–8

micro:bit

Bike Indicator, 204–209

build, 124–125

code, 125–127

Cookie Jar Protector, 134–138

Door Sensor to Tell When Your Room Is Under Attack, 112–115

Floor Mat Alarm, 179

Light Sensor to Detect Vampire Zombies, 52–54

Light-Up Attack Sword, 79–85

Light-Up Backpack, 60–67

Lock to Protect Your Sword, 124–128

Mobile Alarm for Your Devices, 167–170

Moisture Sensor for Your Plants, 212–214

Name Badge to Identify Valid Family Members, 105–106

Number Lock for Your Devices, 144–151

overview, 1–2

Reaction Game to Test for Zombies, 92–97

Step Counter, 195–199

Temperature Monitor, 220–224

Treasure Box Alarm, 185–188

Window Alarm, 238–242

Zombie Detector, 27–29

Zombie Escape Sign, 37–38

microPython, 2

milliseconds, 29

missions

Bike Indicator, 201–209

Cookie Jar Protector, 133–141

Door Sensor to Tell When Your Room Is Under Attack, 109–121

Floor Mat Alarm, 177–183

Light Sensor to Detect Vampire Zombies, 51–56

Light-Up Attack Sword, 75–90

Light-Up Backpack, 57–74

Lock to Protect Your Sword, 123–132

Mobile Alarm for Your Devices, 167–176

Moisture Sensor for Your Plants, 211–217

Name Badge to Identify Valid Family Members, 105–108

Number Lock for Your Devices, 143–165

overview, 21–23

Reaction Game to Test for Zombies, 91–102

Step Counter, 195–199

Temperature Alarm, 235

Temperature Monitor, 219–233

Treasure Box Alarm, 185–191

Window Alarm, 237–248

Zombie Detector, 27–36

Zombie Escape Sign, 37–49

mistakes, common, 19–20

Mobile Alarm for Your Devices

algorithm, 167

build, 167, 170, 174

in Circuit Playground Express, 170–173

code, 168–170, 170–173, 174–176

debugging, 170, 173, 176

expert level, 170, 173, 176

in micro:bit, 166–170

in Raspberry Pi, 174–176

Moisture Sensor for Your Plants

algorithm, 211

build, 212, 215

in Circuit Playground Express, 215–217

code, 213, 215–216

debugging, 214, 216–217

expert level, 214, 217

in micro:bit, 212–214

N

Name Badge to Identify Valid Family Members

algorithm, 105

build, 105–106, 106–107

in Circuit Playground Express, 106–108

code, 106, 107

debugging, 106, 107

expert level, 106, 108

in micro:bit, 105–106

Number Lock for Your Devices

algorithm, 143

build, 144, 151, 157–161

in Circuit Playground Express, 151–157

code, 144–150, 151–156, 162–164

debugging, 151, 157, 165

expert level, 151, 157, 165

in micro:bit, 144–151

in Raspberry Pi, 157–165

O

offset, 222, 226

OR statements, 133

P

Pimoroni, 31

pins, 3

push buttons, 158–161

Python

coding Raspberry Pi with, 11–16

comments, 42

common mistakes, 19–20

files, 12–14

functions, 44–46

lists, 162

shell, 12

strings, 175

terminal, 14–16

turtle library, 41

R

radio groups, 168

Raspberry Pi

coding with Python, 11–16

Door Sensor to Tell When Your Room Is Under Attack, 117–121

Floor Mat Alarm, 181–183

general information, 1

Number Lock for Your Devices, 157–165

overview, 3–4

Reaction Game to Test for Zombies, 99–102

Temperature Monitor, 228–233

Window Alarm, 246–248

Zombie Detector, 31–36

Zombie Escape Sign, 40–49

Raspbian Stretch, 11

Reaction Game to Test for Zombies

algorithm, 92, 99

build, 92, 97, 99

in Circuit Playground Express, 97–98

code, 93–96, 97–98, 99

debugging, 96–97, 100–102

expert level, 97, 98, 102

in micro:bit, 92–97

overview, 91

in Raspberry Pi, 99–102

repeat loops, 113, 115

Rubber Ducking, 19

See also debugging

S

selection, 51

simulators, 8–9

sound

find your own sounds, 119

troubleshooting, 119

Step Counter

algorithm, 195

build, 195–196, 199

in Circuit Playground Express, 199

code, 196–198, 199

debugging, 198–199

expert level, 199

in micro:bit, 195–199

strip variable, 65

T

tactile buttons, 158–161

Temperature Alarm, 235

Temperature Monitor

algorithm, 219

build, 220, 224, 228

in Circuit Playground Express, 224–228

code, 220–222, 224–226, 228–233

debugging, 222–223, 226–227, 233

expert level, 224, 233

in micro:bit, 220–224

in Raspberry Pi, 228–233

terminal blocks, 61

Touch pHAT, 31

Treasure Box Alarm

algorithm, 185

build, 185, 188

in Circuit Playground Express, 188–191

code, 185–188, 188–190

debugging, 188, 191

expert level, 188, 191

in micro:bit, 185–188

troubleshooting, 19–20

sound, 119

try and except code, 231

turtle library, 41

V

variables, 35, 65, 239

Boolean, 126

strip, 65

W

while loops, 92

Window Alarm

algorithm, 237

build, 238, 242, 246

in Circuit Playground Express, 242–245

code, 238–240, 242–244, 246–248

debugging, 240–241, 244, 248

expert level, 242, 244–245, 248

in micro:bit, 238–242

in Raspberry Pi, 246–248

Z

zero, counting at, 83

Zombie Detector

algorithm, 27

build, 27, 29, 31

in Circuit Playground Express, 29–30

code, 28, 29–30, 31–35

debugging, 28–29, 30, 36

expert level, 29, 30, 36

in micro:bit, 27–29

in Raspberry Pi, 31–36

Zombie Escape Sign

algorithm, 37

build, 37, 39, 40

in Circuit Playground Express, 39–40

code, 37–38, 39, 40–46

debugging, 38, 39–40, 47–48, 49

expert level, 38, 40, 48

in micro:bit, 37–40

in Raspberry Pi, 40–49

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

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