Getting Started with Adafruit Circuit Playground Express: The Multipurpose Learning and Development Board with Built-In LEDs, Sensors, and Accelerometer

Getting Started with Adafruit Circuit Playground Express: The Multipurpose Learning and Development Board with Built-In LEDs, Sensors, and Accelerometer

by Mike Barela

Paperback

$17.99 $19.99 Save 10% Current price is $17.99, Original price is $19.99. You Save 10%.
Choose Expedited Shipping at checkout for guaranteed delivery by Monday, March 25

Product Details

ISBN-13: 9781680454888
Publisher: Maker Media, Inc
Publication date: 09/10/2018
Pages: 254
Sales rank: 831,125
Product dimensions: 5.40(w) x 8.30(h) x 0.60(d)

About the Author

Engineer, Maker, and innovator Mike Barela is a Senior Foreign Service Officer with the US Department of State. A graduate of both Whitman College and the California Institute of Technology in Electrical Engineering, he has worked at Hewlett-Packard, the NASA Jet Propulsion Laboratory, and Boeing. He has traveled the world, living in a number of countries providing security to American Embassies. An avid electronics enthusiast, he has worked on computers since the introduction of the PC. He rekindled his electronics and microcontroller interests, authoring a number of popular articles on using Arduino-compatible systems. This includes collaboration with Adafruit Industries on their popular Trinket microcontroller.

Table of Contents

Foreword ix

Preface xi

1 Introducing Circuit Playground Express 1

2 A Tour of Circuit Playground Express 7

Circuit Playground Express Outputs 10

Circuit Playground Express Inputs 12

Powering Your Circuit Playground Express 13

Operating System Software Setup 17

Chapter Questions 20

3 Getting Started with Microsoft MakeCode 21

Connecting a Circuit Playground Express to a Computer 22

MakeCode: Your First Program 24

Uploading MakeCode to Circuit Playground Express 30

Modifying a Program 39

Saving a Program 44

Under the Hood: JavaScript 46

Wrap-Up 48

Chapter Questions 48

4 Microsoft MakeCode and Interactivity 49

Using Buttons 50

Shake, Rattle, and Roll 63

Making the Accelerometer Display Multiple Animations 67

Using the Slide Switch 70

Your Turn: Slide Switch 74

JavaScript 74

Wrap-Up 76

Chapter Questions 76

5 Advanced Microsoft MakeCode 77

Sound and Music 78

Listening for Sounds 85

Wrap-Up 92

Chapter Questions 92

6 Coding with CircuitPython 93

CircuitPython vs. Other Python Implementations 95

Installing CircuitPython 96

Text Editors 102

Eject or Sync the Drive after Writing 103

Using Mu 105

Creating Python Code 107

Examining the CircuitPython Blink Code 114

Output from Circuit Playground Express to the Computer 115

The Adafruit Circuit Playground Express Library 119

Running Code on Express via the REPL 124

Wrap-Up 126

Chapter Questions 126

7 Using the Circuit Playground Express CircuitPython Library 127

Reading Sensors 128

File Input and Output 131

Capacitive Touch and Music 142

Emulating a Computer USB Keyboard 155

Mouse Emulation 161

Wrap-Up 165

Chapter Questions 165

8 Using the Arduino Development Environment 167

The Arduino Programming Language 170

Installing the Arduino IDE 171

Structure of an Arduino Program 177

Uploading Code to Circuit Playground Express 184

The Circuit Playground Arduino Library 191

Circuit Playground Library Functions 195

Example Code 199

Libraries and Compatibility 201

Wrap-Up 204

Chapter Questions 205

A Troubleshooting 207

USB Cable and Power Issues 207

Connectivity Issues 210

CircuitPython Issues 213

Arduino IDE Issues 215

Common Arduino Library Problems 215

Error Messages 218

Usage Issues 219

Manufacturer Support 221

B Reference Materials 223

On the Internet 223

Publications 225

About the Author 227

Index 229

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews