| поискавой системы для электроныых деталей |
|
DEV-07914 датащи(PDF) 8 Page - SparkFun Electronics |
|
|
|||||||||||||||||||||||||||||
DEV-07914 датащи(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 |
|
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |