Plugging in the Makefile-based Arduino workflow
yaaaaaay
This commit is contained in:
parent
aaf02c5155
commit
79ef4e80b3
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,4 @@
|
||||
/postgresql/tutorial/weather/data/
|
||||
/arduino/arduino.mk
|
||||
.dep
|
||||
*.hex
|
||||
|
2
arduino/.env
Normal file
2
arduino/.env
Normal file
@ -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);
|
||||
}
|
||||
}
|
||||
|
1
arduino/HelloWorld/Makefile
Symbolic link
1
arduino/HelloWorld/Makefile
Symbolic link
@ -0,0 +1 @@
|
||||
../arduino.mk
|
1
arduino/Makefile
Symbolic link
1
arduino/Makefile
Symbolic link
@ -0,0 +1 @@
|
||||
arduino.mk
|
5
arduino/setup
Executable file
5
arduino/setup
Executable 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
|
Loading…
Reference in New Issue
Block a user