v.2
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#define PIN_INPUT 2
|
||||
#define PIN_LED 13
|
||||
|
||||
void setup() {
|
||||
Serial.begin(9600);
|
||||
pinMode(PIN_INPUT, INPUT);
|
||||
pinMode(PIN_LED, OUTPUT);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
int sensorVal = digitalRead(PIN_INPUT);
|
||||
Serial.print(sensorVal); // Выводим значение в мониторе порта
|
||||
delay(500);
|
||||
}
|
||||
Reference in New Issue
Block a user