You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The repository contains the various firmware applications for the SparkFun DataLogger IoT incarnations.
6
6
7
-
The firmware defines the functionally available for the supported DataLogger IoT boards, with the core implementation of the exposed features delivered by the [SparkFun Flux Framework](https://github.com/sparkfun/SparkFun_Flux).
7
+
The firmware defines the functionally available for the supported DataLogger IoT boards, with the core implementation of the exposed features delivered by the [SparkFun Flux SDK](https://github.com/sparkfun/flux-sdk).
8
8
9
9
## Building and Uploading
10
10
@@ -24,19 +24,49 @@ arduino-cli core update-index
24
24
arduino-cli core install esp32:esp32
25
25
```
26
26
27
-
### Install Flux
28
-
The version of the ***SparkFun Flux*** library the DataLogger uses is linked in as a submodule to this repository. To checkout the submodule contents, issue the following command in the root folder of the repository.
27
+
### Install the *flux sdk*
28
+
29
+
The flux sdk is used to create a custom Arduino Library called ```SparkFun_Flux``` that is made available for use by the Arduino build environment. This allows tailoring which components are needed for the specific application - in this case the datalogger.
30
+
31
+
First steps is to download the flux-sdk on your machine - which is cloned from github.
The flux framework depends on a large number of Arduino libraries. To install all dependencies, Flux provides an installation script. This script requires the ```arduino-cli``` and is run by issuing the following command from the root folder of the DataLogger repository:
37
+
The normal location is to set install the flux-sdk in the same directory as the ```sfe-dataloger``` (this) repository was installed. If you install it some other location, set the flux-sdk path using the FLUX_SDK_PATH environment variable. This is easily done by cd'ing into the flux-sdk root directory and executing the following command:
35
38
36
39
```sh
37
-
./SparkFun_Flux/install-libs.sh
40
+
export FLUX_SDK_PATH=`pwd`
38
41
```
39
42
43
+
### Install dependant Arduino libraries
44
+
45
+
Once the flux-sdk is installed, you can install all libraries the framework depends on by issuing the following command:
46
+
47
+
```sh
48
+
$FLUX_SDK_PATH/install-libs.sh
49
+
```
50
+
51
+
### Using CMake
52
+
53
+
To configure the library used during the Arduino build process, the ```cmake``` system is used. The following steps outline how the custom library is built.
54
+
55
+
Set the current directory the root of the sfe-datalogger. Then create a directory called build and cd into it.
56
+
57
+
```sh
58
+
mkdir build
59
+
cd build
60
+
```
61
+
62
+
Now run CMake with the following command:
63
+
64
+
```sh
65
+
cmake ..
66
+
```
67
+
68
+
This will create an Arduino library called ```SparkFun_Flux``` in the root directory of the sfe-datalogger repository. Once completed, you can delete the build directory, and build the datalogger firmware.
69
+
40
70
### Build the Firmware
41
71
42
72
The following command will build the DataLogger firmware. This command is run from the root directory of this repo.
@@ -72,13 +102,14 @@ The firmware is also automatically built by a GitHub action on code check-in. Th
72
102
## Firmware Upload
73
103
74
104
### esptool.py
105
+
75
106
To upload the firmware, the ESP32 tool ```esptool.py``` is used. Installation instructions are located [here](https://docs.espressif.com/projects/esptool/en/latest/esp32/installation.html). If Python is setup on your system, a ```pip3``` can be used:
76
107
77
108
```sh
78
109
pip3 install esptool
79
110
```
80
111
81
-
Once installed - the following command is used to upload the build firmware to an attached DataLogger.
112
+
Once installed - the following command is used to upload the build firmware to an attached DataLogger.
*```<PORT>``` - Is the port the board is connected to on your development machine
95
126
*```-baud``` - Set this to a value that works for your development machine. The above command uses ```460800```
96
-
*```-e``` - This command switch will release the ESP32 flash and is helpful for development.
127
+
*```-e``` - This command switch will release the ESP32 flash and is helpful for development.
97
128
* For a faster upload, omit this option
98
129
99
130
### Uploading Automated GitHub Build Results
100
131
101
132
This repository builds DataLogger firmware using a GitHub action. To use this pre-built firmware on a DataLogger IoT board, do the following steps:
102
133
103
-
Download the desired firmware files from:
134
+
Download the desired firmware files from:
104
135
105
136
* The results from a GitHub [Action](https://github.com/sparkfun/SparkFun_DataLogger/actions)
106
137
* Or a specific DataLogger [Release](https://github.com/sparkfun/SparkFun_DataLogger/releases)
107
138
108
-
The downloaded zip file contains the three ```.bin``` files for the release.
139
+
The downloaded zip file contains the three ```.bin``` files for the release.
109
140
110
-
Once unzipped, modified the paths to the desired ```.bin``` files in the above ```esptool.py``` command to upload the firmware to an attached DataLogger board.
141
+
Once unzipped, modified the paths to the desired ```.bin``` files in the above ```esptool.py``` command to upload the firmware to an attached DataLogger board.
0 commit comments