LoRaGateway_BTS2A/arduino vers arduino/COM_UART_ARDUINO/transmitter/transmitter.ino
flavienhaas 1ac49a2ac4 maj
2018-03-27 17:00:33 +02:00

22 lines
394 B
C++

/*
DigitalReadSerial
Reads a digital input on pin 2, prints the result to the serial monitor
*/
// digital pin 2 has a pushbutton attached to it. Give it a name:
int pushButton = 7;
void setup() {
Serial.begin(9600);
pinMode(pushButton, INPUT);
}
void loop() {
int buttonState = digitalRead(pushButton);
//if(buttonState == 1)
//{
Serial.println("a");
//}
delay(1000);
}