This commit is contained in:
Kolodkin Timofey 2024-04-22 20:09:37 +03:00
commit f7332764c8

View File

@ -0,0 +1,22 @@
const int Pin = 2;
void setup() {
Serial.begin(9600);
}
void loop() {
int port = digitalRead(Pin); //считываем состояние порта
if(port == LOW)
{
Serial.print("0");
} else
Serial.print("1");
delay(500);
}