Skip to content

Commit 4a68365

Browse files
authored
Added example
Added LED and input sketch
1 parent 445867b commit 4a68365

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#include "Arduino_SensorKit.h"
2+
3+
SensorKit kit;
4+
5+
int button = 4;
6+
int LED = 6;
7+
8+
void setup() {
9+
// put your setup code here, to run once:
10+
Serial.begin(9600);
11+
while (!Serial);
12+
13+
kit.begin();
14+
15+
pinMode(button , INPUT);
16+
pinMode(LED, OUTPUT);
17+
18+
digitalWrite(LED, LOW);
19+
}
20+
21+
void loop() {
22+
// put your main code here, to run repeatedly:
23+
if (digitalRead(button)) {
24+
digitalWrite(LED, HIGH);
25+
} else {
26+
digitalWrite(LED, LOW);
27+
}
28+
}

0 commit comments

Comments
 (0)