-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathread_mega.cpp
More file actions
32 lines (29 loc) · 731 Bytes
/
read_mega.cpp
File metadata and controls
32 lines (29 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "read_mega.h"
#include <Arduino.h>
void setup() {
// put your setup code here, to run once:
pinMode(53,INPUT_PULLUP); //10
pinMode(51,INPUT_PULLUP); //9
pinMode(49,INPUT_PULLUP); //8
pinMode(47,INPUT_PULLUP); //7
pinMode(45,INPUT_PULLUP); //5
pinMode(43,INPUT_PULLUP); //4
pinMode(41,INPUT_PULLUP); //3
Serial.begin(9600);
}
void loop() {
Serial.print(digitalRead(53));
Serial.print(" " );
Serial.print(digitalRead(51));
Serial.print(" " );
Serial.print(digitalRead(49));
Serial.print(" " );
Serial.print(digitalRead(47));
Serial.print(" " );
Serial.print(digitalRead(45));
Serial.print(" " );
Serial.print(digitalRead(43));
Serial.print(" " );
Serial.print(digitalRead(41));
Serial.println();
}