Skip to content

Commit f2714ca

Browse files
committed
fix automatic lib dependency detection with Python 3 + add more examples
1 parent 24aa664 commit f2714ca

File tree

6 files changed

+34
-4
lines changed

6 files changed

+34
-4
lines changed

Arduino-Makefile

Makefile-OSX.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
### PROJECT_DIR
77
### This is the path to where you have created/cloned your project
8-
PROJECT_DIR = $(shell dirname $(shell pwd))
8+
PROJECT_DIR = $(shell dirname $(shell dirname $(shell pwd)))
99

1010
### ARDMK_DIR
1111
### Path to the Arduino-Makefile directory.
@@ -20,7 +20,7 @@ ARDUINO_DIR = /Applications/Arduino.app/Contents/Java
2020

2121
### USER_LIB_PATH
2222
### Path to where the your project's libraries are stored.
23-
USER_LIB_PATH := $(realpath $(PROJECT_DIR)/lib)
23+
USER_LIB_PATH := $(PROJECT_DIR)/lib
2424

2525
### BOARD_TAG & BOARD_SUB
2626
### For Arduino IDE 1.0.x
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include <Arduino.h>
22
#include <Wire.h>
33
#include "BarLib.h"
4-
#include "FooLib.h"
54

65
BarClass BarObject;
76

src/FooBarProject/Config.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#ifndef _CONFIG_H_
2+
#define _CONFIG_H_
3+
4+
#include "BarLib.h"
5+
6+
BarClass BarObject;
7+
8+
const int loopDelay = 1000;
9+
10+
#endif

src/FooBarProject/main.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#include <Arduino.h>
2+
#include <Wire.h>
3+
4+
#include "Config.h"
5+
6+
void setup() {
7+
8+
Serial.begin(115200);
9+
delay(loopDelay);
10+
11+
}
12+
13+
void loop() {
14+
15+
BarObject.firstBarMethod();
16+
delay(loopDelay);
17+
BarObject.secondBarMethod();
18+
delay(loopDelay);
19+
20+
}
21+

0 commit comments

Comments
 (0)