Arduino/sketch_apr22a/sketch_apr22a.ino
Kolodkin Timofey f7332764c8 Create
2024-04-22 20:09:37 +03:00

23 lines
244 B
C++

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);
}