Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# ArduinoOOP
This is an Arduino-based project that will follow my progression learning C++ (on the Arduino IDE and otherwise) with a goal of proficiency in object-oriented programming for mechatronics engineering. I will start by building an 'mp3 player' with Adafruit components and program the software to read data from a TF card and output audio using Bluetooth low-energy protocals.
This is an Arduino-based project that will follow my progression learning C++ (on the Arduino IDE and otherwise) with a goal of proficiency in object-oriented programming for mechatronics engineering.
18 changes: 18 additions & 0 deletions digital-read-button.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
void setup() {
// put your setup code here, to run once:
pinMode(0, INPUT);
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(9600);
}

void loop() {
// put your main code here, to run repeatedly:
digitalRead(0);
int input1 = digitalRead(0);
if(input1 == 0) {
digitalWrite(LED_BUILTIN, HIGH);
delay(100);
}
digitalWrite(LED_BUILTIN, LOW);
Serial.println(input1);
}