Plugging in the Makefile-based Arduino workflow

yaaaaaay
cat-town
Dan Buch 11 years ago
parent aaf02c5155
commit 79ef4e80b3

3
.gitignore vendored

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

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

@ -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);
}
}

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

@ -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
Loading…
Cancel
Save