Chapter 3

Digital Input and Output

Chapter outline

3.1 Starting to Program

3.1.1 Thinking about the First Program

3.1.2 Understanding the mbed API

3.1.3 Exploring the while Loop

3.2 Voltages as Logic Values

3.3 Digital Output on the mbed

3.3.1 Using LEDs

3.3.2 Using mbed External Pins

3.4 Using Digital Inputs

3.4.1 Connecting Switches to a Digital System

3.4.2 The DigitalIn API

3.4.3 Using if to Respond to a Switch Input

3.5 Interfacing Simple Opto Devices

3.5.1 Opto Reflective and Transmissive Sensors

3.5.2 Connecting an Opto-Sensor to the mbed

3.5.3 Seven-Segment Displays

3.5.4 Connecting a Seven-segment Display to the mbed

3.6 Switching Larger DC Loads

3.6.1 Applying Transistor Switching

3.6.2 Switching a Motor with the mbed

3.6.3 Switching ...

Get Fast and Effective Embedded Systems Design now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.