DFR0423

DFR0423 Datasheet


Switch SKU DFR0423

Part Datasheet
DFR0423 DFR0423 DFR0423 (pdf)
PDF Datasheet Preview
Switch SKU DFR0423

From Robot Wiki

Contents
• 1 Introduction
• 2 Specification
• 3 Pinouts
• 4 Tutorial
o Requirements o Wiring Diagram o Sample Code o Results

Introduction

This module is a self locking switch. Press the button to turn it to the "on" state. Press it again to turn it to the "off" state. The board has immersion gold plating and is compatible with the "gravity" 3 pin interface, making it easy to connect to an Arduino I/O expansion shield.

Specification
• Operating Voltage
• Output Type Digital
• Interface Mode
• Dimension 30*22mm/1.18*0.86 inches

Pinouts

Tutorial

This is a simple test code that will test if the button is pressed or not. Requirements
• Hardware o UNO x1 o Switch x1 o Jumper Wires
• Software o Arduino IDE V1.6.8 Click to Download Arduino IDE from

Wiring Diagram

Sample Code:
2 * Self-Locking Switch
4 * This example lights the LED when the button is pressed
7 * V1.0
8 * 2016-1-25
10 * GNU Lesser General Public License.
11 * See for details.
12 * All above must be included in any redistribution
16 int ledPin = 13;
17 int inputPin = 4;
19 void setup
20 pinMode ledPin, OUTPUT ;
21 pinMode inputPin, INPUT ;
24 void
25 int val = digitalRead inputPin ;
26 if val == HIGH
digitalWrite ledPin, HIGH ;
28 else
digitalWrite ledPin, LOW ;

Results When you press the button, the LED connected to pin 13 of the micro controller will turn on press the button again and the LED will turn off.

For any questions/advice/cool ideas to share, please visit DFRobot Forum.

Powered By DFRobot 2008-2017
More datasheets: SMBJ6.0A-13 | SMBJ85CA-13 | SMBJ170A-13 | A0723076 | A0723008 | A0723040 | A0723007 | A0723033 | A0723035 | A0723037


Notice: we do not provide any warranties that information, datasheets, application notes, circuit diagrams, or software stored on this website are up-to-date or error free. The archived DFR0423 Datasheet file may be downloaded here without warranties.

Datasheet ID: DFR0423 508762