arduino serial example

This commit is contained in:
Alexander Popov 2023-08-16 22:05:59 +03:00
parent 5538558c7c
commit 836a237ec7
Signed by: iiiypuk
GPG Key ID: E47FE0AB36CD5ED6
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
// будем искать слово hello
char target[] = "hello";
void setup() {
Serial.begin(9600);
}
void loop() {
if (Serial.available() > 0) {
if (Serial.find(target))
Serial.println("found");
// вывести found, если было послано hello
}
}