Create
This commit is contained in:
commit
f7332764c8
22
sketch_apr22a/sketch_apr22a.ino
Normal file
22
sketch_apr22a/sketch_apr22a.ino
Normal 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);
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user