aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasil Zlatanov <v@skozl.com>2017-03-02 15:00:12 +0000
committerVasil Zlatanov <v@skozl.com>2017-03-02 15:00:12 +0000
commit660172378f4ee083635fa4771c5409bc95533eab (patch)
tree9d2a40d6729e2abe1de92d4072d7db0193c15059
parente044ed346e5185685ca581874cb2e60288d99837 (diff)
downloade2-lifelarm-660172378f4ee083635fa4771c5409bc95533eab.tar.gz
e2-lifelarm-660172378f4ee083635fa4771c5409bc95533eab.tar.bz2
e2-lifelarm-660172378f4ee083635fa4771c5409bc95533eab.zip
move source into src to aid compilation
-rwxr-xr-xMakefile4
-rw-r--r--src/src.ino (renamed from main.ino)5
2 files changed, 4 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index b831f77..15b9a9c 100755
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
all:
- arduino --board adafruit:avr:feather32u4 --pref build.path=./build --verify ./main.ino
+ arduino --board adafruit:avr:feather32u4 --pref build.path=./build --verify ./src/src.ino
clean:
rm -rf ./build
upload:
- arduino --board adafruit:avr:feather32u4 --port /dev/ttyACM0 --upload ./main.ino
+ arduino --board adafruit:avr:feather32u4 --port /dev/ttyACM0 --upload ./src/src.ino
diff --git a/main.ino b/src/src.ino
index 90f5d41..2950d6a 100644
--- a/main.ino
+++ b/src/src.ino
@@ -38,7 +38,7 @@ void setup() {
}
// Set button to active low
- pinmode(activateLarm, INPUT_PULLUP);
+ pinMode(activateLarm, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(activateLarm), sendHelp, CHANGE);
Serial.println("LifeLarm Ready");
@@ -101,11 +101,10 @@ void loop() {
}
}
-void sendHelp() [
+void sendHelp() {
Serial.println("Sending text...");
if (!fona.sendSMS(callerIDbuffer, "HELP! ... --- ... I will be sending my location to you!")) {
Serial.println(F("Failed to send!"));
- failed++;
} else {
Serial.println(F("Sent!"));
}