Plugging in the Makefile-based Arduino workflow

yaaaaaay
This commit is contained in:
Dan Buch 2013-12-28 22:26:28 -05:00
parent aaf02c5155
commit 79ef4e80b3
6 changed files with 24 additions and 12 deletions

3
.gitignore vendored
View File

@ -1 +1,4 @@
/postgresql/tutorial/weather/data/
/arduino/arduino.mk
.dep
*.hex

2
arduino/.env Normal file
View File

@ -0,0 +1,2 @@
export ARDUINODIR=~/opt/arduino-1.0.5
export BOARD=uno

View File

@ -1,6 +1,16 @@
const unsigned int LED_PIN = 13;
const unsigned int PAUSE = 500;
const unsigned int FLASH_DURATION = 50;
const unsigned int PAUSE = 700;
const unsigned int FLASH_DURATION = 100;
void flash(int n) {
for (int i = 0; i < n; i++) {
digitalWrite(LED_PIN, HIGH);
delay(FLASH_DURATION);
digitalWrite(LED_PIN, LOW);
delay(FLASH_DURATION);
}
}
void setup() {
@ -15,13 +25,3 @@ void loop() {
}
delay(PAUSE);
}
void flash(int n) {
for (int i = 0; i < n; i++) {
digitalWrite(LED_PIN, HIGH);
delay(FLASH_DURATION);
digitalWrite(LED_PIN, LOW);
delay(FLASH_DURATION);
}
}

1
arduino/HelloWorld/Makefile Symbolic link
View File

@ -0,0 +1 @@
../arduino.mk

1
arduino/Makefile Symbolic link
View File

@ -0,0 +1 @@
arduino.mk

5
arduino/setup Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
set -e
cd $(dirname "$BASH_SOURCE")
curl -L -O -s http://ed.am/dev/make/arduino-mk/arduino.mk