Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit dfc53aa

Browse files
update LED on with button pressed
1 parent c11366e commit dfc53aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎Switch_Button/Switch_Button.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ const int ledPin = 13; // the number of the LED pin
33

44
// variables will change:
55
int buttonState = 0; // variable for reading the pushbutton status
6+
int serial_monitor = 9600;
67

78
void setup() {
89
// initialize the LED pin as an output:
910
pinMode(ledPin, OUTPUT);
1011
// initialize the pushbutton pin as an input:
1112
pinMode(buttonPin, INPUT);
1213

13-
Serial.begin(9600);
14+
Serial.begin(serial_monitor);
1415
}
1516

1617
void loop() {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /