| Electronic Components Datasheet Search |
|
DFR0029 Datasheet(PDF) 3 Page - DFROBOT |
|
|
|||||||||||||||||||||||||||||
DFR0029 Datasheet(HTML) 3 Page - DFROBOT |
|
3 / 3 page ![]() Sample Code /* # Description: # When you push the digital button, the Led 13 on the board will turn on. O therwise,the led turns off. */ int ledPin = 13; // choose the pin for the LED int inputPin = 2; // Connect sensor to input pin 3 void setup() { pinMode(ledPin, OUTPUT); // declare LED as output pinMode(inputPin, INPUT); // declare pushbutton as input } void loop(){ int val = digitalRead(inputPin); // read input value if (val == HIGH) { // check if the input is HIGH digitalWrite(ledPin, LOW); // turn LED OFF } else { digitalWrite(ledPin, HIGH); // turn LED ON } } Powered By DFRobot © 2008-2017 |
|
|
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 |