Files
Arduino/sketch_apr22a/sketch_apr22a.ino
T
2024-04-22 20:09:37 +03:00

23 lines
244 B
Arduino

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