| Electronic Components Datasheet Search |
|
DFR0423 Datasheet(PDF) 3 Page - DFROBOT |
|
|
|||||||||||||||||||||||||||||
DFR0423 Datasheet(HTML) 3 Page - DFROBOT |
|
3 / 4 page ![]() Sample Code: 1 /*************************************************** 2 * Self-Locking Switch 3 * **************************************************** 4 * This example lights the LED when the button is pressed 5 6 * @author linfeng(490289303@qq.com) 7 * @version V1.0 8 * @date 2016-1-25 9 10 * GNU Lesser General Public License. 11 * See <http://www.gnu.org/licenses/> for details. 12 * All above must be included in any redistribution 13 * ****************************************************/ 14 15 16 int ledPin = 13; 17 int inputPin = 4; 18 19 void setup() { 20 pinMode(ledPin, OUTPUT); 21 pinMode(inputPin, INPUT); 22 } 23 24 void loop(){ 25 int val = digitalRead(inputPin); 26 if (val == HIGH) { 27 digitalWrite(ledPin, HIGH); 28 } else { 29 digitalWrite(ledPin, LOW); 30 } 31 } |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |