RobotGeek 101: Digital Input Reference

This lesson is part of the RobotGeek 101 Learning Series. If you haven't already, please download the example sketches, and follow through the Geekduino Getting Started Guide to handle the foundations of using the Arduino IDE in conjunction with the Geekduino.

Welcome to RobotGeek 101 : Digital Input Reference. This reference expands upon the concepts covered in the Digital Input Introduction, and introduces more advanced concepts that will give you a more comprehensive knowledge of the workings of Digital Input.

Parts used in this lesson:

These parts and everything you need to complete chapters 1-7 in RobotGeek 101 are available in the RobotGeek Basic Experimenter's Kit.

Contents:

Introduction

C-buttonToggle

code.png Click here to expand the code

diagram.png Click here to expand the diagram

Let's use the Arduino IDE to toggle an LED whenever the button (with debouncing) is pressed. Open the following sketch in your Arduino IDE

File > Sketchbook > RobotGeek sketches > RG101 > 02 - digitalInput > C-buttonToggle

Back to Contents

D-buttonWithPullup

code.png Click here to expand the code

diagram.png Click here to expand the diagram

Let's use the Arduino IDE to read a standard pushbutton without resistor attached to digital pin 2 and turn on digital pin 3 whenever the button is pressed. Open the following sketch in your Arduino IDE

File > Sketchbook > RobotGeek sketches > RG101 > 02 - digitalInput > D-buttonWithPullup

Back to Contents

E-buttonAdapatable

code.png Click here to expand the code

diagram.png Click here to expand the diagram

Let's use the Arduino IDE to read a pushbutton with resistor attached to digital pin 2 and turn on digital pin 3 whenever the button is pressed. Open the following sketch in your Arduino IDE

File > Sketchbook > RobotGeek sketches > RG101 > 02 - digitalInput > E-buttonAdapatable

Back to Contents

Digital Input Examples from Arduino

Feedback Form


Search