LoRaGateway_BTS2A/arduino vers arduino/COM_UART_ARDUINO/transmitter/transmitter.ino

22 lines
394 B
Arduino
Raw Normal View History

2018-03-27 17:00:33 +02:00
/*
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);
}