Double Buttons Module

From LinkSprite Playgound
Revision as of 08:32, 9 April 2014 by Qian.zhang (talk | contribs) (Created page with "==Introduction== Linker Double Buttons has two push button switches. File:Double Buttons == Schematics == *[] ==Application Ideas== '''test''' <syntaxhighlight lang=...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

Linker Double Buttons has two push button switches.

File:Double Buttons

Schematics

  • []

Application Ideas

test <syntaxhighlight lang="c"> /************************************************************************* > File Name: Linker_buttonv2.c > Author: Darren > Created Time: Fri Jan 1 00:05:19 2010

************************************************************************/
  1. include "Arduino.h"

const int s1_pin = 3; const int s2_pin = 2;

void setup(){ pinMode (s1_pin, INPUT); pinMode (s2_pin, INPUT);

       Serial.begin (9600);

}

void loop (){ if(digitalRead (s1_pin)){ Serial.println ("buttom_1 have been hold down!"); } delay (50); if(digitalRead (s2_pin)){ Serial.println ("buttom_2 have been hold down!"); } delay (50);

} </syntaxhighlight>