+353-1-416-8900REST OF WORLD
+44-20-3973-8888REST OF WORLD
1-917-300-0470EAST COAST U.S
1-800-526-8630U.S. (TOLL FREE)

Designing Embedded Systems and the Internet of Things (IoT) with the ARM mbed. Edition No. 1

  • Book

  • 344 Pages
  • July 2018
  • John Wiley and Sons Ltd
  • ID: 4414172

A comprehensive and accessible introduction to the development of embedded systems and Internet of Things devices using ARM mbed

Designing Embedded Systems and the Internet of Things (IoT) with the ARM mbed offers an accessible guide to the development of ARM mbed and includes a range of topics on the subject from the basic to the advanced. ARM mbed is a platform and operating system based on 32-bit ARM Cortex-M microcontrollers. This important resource puts the focus on ARM mbed NXP LPC1768 and FRDM-K64F evaluation boards. NXP LPC1768 has powerful features such as a fast microcontroller, various digital and analog I/Os, various serial communication interfaces and a very easy to use Web based compiler. It is one of the most popular kits that are used to study and create projects. FRDM-K64F is relatively new and largely compatible with NXP LPC1768 but with even more powerful features.

This approachable text is an ideal guide that is divided into four sections; Getting Started with the ARM mbed, Covering the Basics, Advanced Topics and Case Studies. This getting started guide:

  • Offers a clear introduction to the topic
  • Contains a wealth of original and illustrative case studies
  • Includes a practical guide to the development of projects with the ARM mbed platform
  • Presents timely coverage of how to develop IoT applications

Designing Embedded Systems and the Internet of Things (IoT) with the ARM mbed offers students and R&D engineers a resource for understanding the ARM mbed NXP LPC1768 evaluation board. 

Table of Contents

About the Author xiii

Preface xv

Author’s Acknowledgments xix

About the companion website xxi

Part I Introduction to Arm® Mbed™ and IoT 1

1 Introduction to Arm® Mbed™ 3

1.1 What is an Embedded System? 3

1.2 Microcontrollers and Microprocessors 4

1.3 ARM® Processor Architecture 8

1.4 The Arm® Mbed™ Systems 10

1.4.1 NXP LPC1768 11

1.4.2 NXP LPC11U24 14

1.4.3 BBC Micro:bit 15

1.4.4 The Arm® Mbed™ Ethernet Internet of Things (IoT) Starter Kit 17

1.5 Summary 21

1.6 Chapter Review Questions 21

2 Introduction to the Internet of Things (IoT) 23

2.1 What is the Internet of Things (IoT)? 23

2.2 How Does IoT Work? 24

2.3 How Will IoT Change Our Lives? 25

2.4 Potential IoT Applications 27

2.4.1 Home 27

2.4.2 Healthcare 28

2.4.3 Transport 28

2.4.4 Energy 28

2.4.5 Manufacture 28

2.4.6 Environment 28

2.5 Summary 29

2.6 Chapter Review Questions 29

3 IoT Enabling Technologies 31

3.1 Sensors and Actuators 31

3.2 Communications 31

3.2.1 RFID and NFC (Near]Field Communication) 32

3.2.2 Bluetooth Low Energy (BLE) 32

3.2.3 LiFi 33

3.2.4 6LowPAN 33

3.2.5 ZigBee 34

3.2.6 Z]Wave 34

3.2.7 LoRa 34

3.3 Protocols 35

3.3.1 HTTP 35

3.3.2 WebSocket 36

3.3.3 MQTT 37

3.3.4 CoAP 38

3.3.5 XMPP 38

3.4 Node]RED 39

3.5 Platforms 41

3.5.5.5.5.5.5.5.5.5.9 macchina.5.6 Summary 45

3.7 Chapter Review Questions 45

Part II Arm® Mbed™ Development 47

4 Getting Started with Arm® Mbed™ 49

4.1 Introduction 49

4.2 Hardware and Software Required 49

4.2.1 Hardware 49

4.2.2 Software 50

4.3 Your First Program: Blinky LED 53

4.3.1 Connect the Mbed to a PC 53

4.3.2 Click “mbed.htm” to Log In 53

4.3.3 Add the FRDM]K64F Platform to Your Compiler 54

4.3.4 Import an Existing Program 54

4.3.5 Compile, Download, and Run Your Program 57

4.3.6 What Next? 57

4.4 Create Your Own Program 57

4.5 C/C++ Programming Language 58

4.6 Functions and Modular Programming 58

4.7 Manage Platforms 61

4.8 Clone Your Program 63

4.9 Search and Replace 64

4.10 Compile Your Program for Multiple Platforms 65

4.11 Delete Your Program 65

4.12 Disaster Recovery Procedure 67

4.13 Upgrade Firmware 67

4.14 Help 67

4.15 Summary 69

5 Inputs and Outputs 71

5.1 Digital Inputs and Outputs 71

5.1.1 Digital Inputs 71

5.1.2 Digital Outputs 74

5.1.3 BusIn, BusOut, and BusInOut 79

5.2 Analog Inputs and Outputs 81

5.2.1 Analog Inputs 81

5.2.2 Analog Outputs 82

5.3 Pulse Width Modulation (PWM) 86

5.4 Accelerometer and Magnetometer 88

5.5 SD Card 96

5.6 Local File System (LPC1768) 99

5.7 Interrupts 100

5.8 Summary 101

6 Digital Interfaces 103

6.1 Serial 103

6.2 SPI 106

6.3 I2C 108

6.4 CAN 111

6.5 Summary 113

7 Networking and Communications 115

7.1 Ethernet 115

7.2 Ethernet Web Client and Web Server 119

7.3 TCP Socket and UDP Socket 124

7.4 WebSocket 128

7.5 WiFi 131

7.6 Summary 135

8 Digital Signal Processing and Control 137

8.1 Low]Pass Filter 137

8.2 High]Pass Filter 141

8.3 Band]Pass Filter 143

8.4 Band]Stop Filter and Notch Filter 146

8.5 Fast Fourier Transform (FFT) 149

8.6 PID Controller 160

8.7 Summary 164

9 Debugging, Timer, Multithreading, and Real]Time Programming 165

9.1 Debugging 165

9.2 Timer, Timeout, Ticker, and Time 167

9.3 Network Time Protocol (NTP) 171

9.4 Multithreading and Real]Time Programming 173

9.5 Summary 179

10 Libraries and Programs 181

10.1 Import Libraries and Programs 181

10.2 Export Your Program 181

10.3 Write Your Own Library 182

10.4 Publish Your Library 188

10.5 Publish Your Program 190

10.6 Version Control 192

10.7 Collaborations 196

10.8 Update Your Library and Program 201

10.9 Summary 202

Part III The IoT Starter Kit and IoT Projects 203

11 Arm® Mbed™ Ethernet IoT Starter Kit 205

11.1 128×32 LCD 205

11.2 Joystick 207

11.3 Two Potentiometers 208

11.4 Speaker 209

11.5 Three]Axis Accelerometer 211

11.6 LM75B Temperature Sensor 211

11.7 RGB LED 212

11.8 Summary 214

12 IoT Projects with Arm® Mbed™ 215

12.1 Temperature Monitoring over the Internet 215

12.2 Smart Lighting 224

12.3 Voice]Controlled Door Access 230

12.4 RFID Reader 237

12.5 Cloud Example with IBM Watson Bluemix 242

12.5.1 IBM Quickstart Service 243

12.5.2 IBM Registered Service (Bluemix) 245

12.5.3 Add IBM Watson IoT Service to Your Application 252

12.5.4 Add Your Mbed Device to Your Watson IoT Organization 252

12.5.5 Adding Credentials onto Your Mbed Device 257

12.5.6 Link Your IBM IoT Watson Application to Your Mbed Device 257

12.5.7 Sending Commands from Your IBM IoT Watson Application to Your Mbed Board 261

12.5.8 More with Node-RED 261

12.6 Real-Time Signal Processing 271

12.7 Summary 277

Part IV Appendices 279

Appendix A: Example Codes 281

Appendix B: HiveMQ MQTT Broker 285

Appendix C: Node]RED on Raspberry Pi 295

Appendix D: String and Array Operations 303

Appendix E: Useful Online Resources 311

Index 313

Authors

Perry Xiao