| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
DEV-07914 bảng dữ liệu(PDF) 8 Page - SparkFun Electronics |
|
|
|||||||||||||||||||||||||||||
DEV-07914 bảng dữ liệu(HTML) 8 Page - SparkFun Electronics |
|
8 / 9 page ![]() int ledPin = 13; int buttonPin = 2; int buttonState = LOW; int oldButtonState = HIGH; char serInput; void setup() { pinMode(ledPin, OUTPUT); pinMode(buttonPin, INPUT); digitalWrite(ledPin, HIGH); Serial.begin(115200); } void loop() { buttonState = digitalRead(buttonPin); if (Serial.available() > 0) { serInput = Serial.read(); Serial.println("Miny, Moe."); } if (buttonState != oldButtonState) { if (buttonState == HIGH) { digitalWrite(ledPin, HIGH); Serial.print("Meeny, "); } else { digitalWrite(ledPin, LOW); Serial.print("Eeny, "); } } oldButtonState = buttonState; } This example will actually work with both the standard USB serial connection, or a BlueSMiRF. Give it a try! Note that the baud rate is set to 115200 bps, this is the default baud rate of the BlueSMiRF. Pressing the button will turn the LED off and |
|
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất 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 |