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
@@ -26,7 +26,6 @@ When this option is selected, the user is presented a prompt to continue. To lau
26
26
27
27

28
28
29
-
30
29
## Factory Reset
31
30
32
31
A factory reset will move the boot firmware of the device to the firmware imaged installed at the ***factory*** and erase any on-board stored settings on the device. This is helpful if an update fails, or an update has issues that prevent proper operations.
@@ -180,7 +179,7 @@ The `VersionNumber` field is often created by the following formula:
One of the key features of the Flux framework is the ability to automatically detect and load different I2C devices, while placing minimal requirements on the device driver developer.
Copy file name to clipboardExpand all lines: docs/build_with_flux.md
+13-14Lines changed: 13 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
2
-
# Building with Flux
2
+
# Building with Flux {#building-with-flux}
3
3
4
-
This section outline the steps needed to support Flux in an Arduino Build Environment. Both support for Arduino IDE development, as well as automated builds that use the Arduino CLI (GitHub actions).
4
+
This section outline the steps needed to support Flux in an Arduino Build Environment. Both support for Arduino IDE development, as well as automated builds that use the Arduino CLI (GitHub actions).
5
5
6
-
Since Flux is private, only available to SparkFun employees and approved partners, the build integration is different from standard Open Source projects.
6
+
Since Flux is private, only available to SparkFun employees and approved partners, the build integration is different from standard Open Source projects.
7
7
8
8
## Using Flux within the Arduino IDE
9
9
@@ -31,9 +31,9 @@ To use Flux in another project that is being build using build automation (GitHu
With this structure in place, access to the Flux within a GitHub action is accomplished by using ssh keys.
34
+
With this structure in place, access to the Flux within a GitHub action is accomplished by using ssh keys.
35
35
36
-
The first step is to generate a new key locally - in a shell
36
+
The first step is to generate a new key locally - in a shell
37
37
38
38
```sh
39
39
ssh-keygen -t rsa -b 4096 -C "Access to flux"
@@ -47,11 +47,11 @@ Next add the public part of the key to the Flux repo as a deploy key. In the Flu
47
47
48
48
Give the key a descriptive name (***my project access key***) and paste the public part of the key into the dialog. Keep the key read-only.
49
49
50
-
The next step is to add the private part of the key as a ***secret*** in main project (the project using flux) github repository. This is done in ```Settings > Secrets and variables > Actions``` page. On this page, on the **Secrets** tab, select the ***New repository secret*** button.
50
+
The next step is to add the private part of the key as a ***secret*** in main project (the project using flux) github repository. This is done in ```Settings > Secrets and variables > Actions``` page. On this page, on the **Secrets** tab, select the ***New repository secret*** button.
51
51
52
52

53
53
54
-
In the provided dialog, enter a name for the secret (follow variable naming methodology) and set the value to the private portion of the generated key.
54
+
In the provided dialog, enter a name for the secret (follow variable naming methodology) and set the value to the private portion of the generated key.
55
55
56
56
## Download the Flux Submodule
57
57
@@ -73,10 +73,9 @@ Within a github action, the key is used to download the Flux submodule. Once the
73
73
74
74
NOTE: In this example, ```FLUX_PULL_KEY_2``` is the name of the Flux key secret within this repository.
75
75
76
-
77
76
Once the Flux submodule is checked out, the application is setup and built using the Arduino Command Line (```arduino-cli```)
78
77
79
-
## Using Arduino CLI
78
+
## Using Arduino CLI
80
79
81
80
### Installation
82
81
@@ -100,11 +99,11 @@ If working within a github action, the following code will install and setup the
100
99
run: arduino-cli core install esp32:esp32
101
100
```
102
101
103
-
Note: The above example also installed the ESP32 platform
102
+
Note: The above example also installed the ESP32 platform
104
103
105
104
### Install Flux Dependencies
106
105
107
-
The Flux repository includes a script that installs all library dependencies using the ```arduino-cli```. This command, ```install-libs.sh``` is located within the root directory of the Flux repository.
106
+
The Flux repository includes a script that installs all library dependencies using the ```arduino-cli```. This command, ```install-libs.sh``` is located within the root directory of the Flux repository.
108
107
109
108
To run this command within a github Action, the following code is used:
110
109
@@ -114,13 +113,13 @@ To run this command within a github Action, the following code is used:
114
113
run: ./SparkFun_Flux/install-libs.sh
115
114
```
116
115
117
-
Note: The above command assumes Flux is installed in the root directory of the repository. Adjust the command path to the structure of your repository if needed.
116
+
Note: The above command assumes Flux is installed in the root directory of the repository. Adjust the command path to the structure of your repository if needed.
118
117
119
118
### Compile and Build
120
119
121
120
Once all the dependencies are installed, the ```arduino-cli compile``` option is called to build the desired application. To use Flux as a library, the ```--library``` switch is used with the compile call.
122
121
123
-
The following is an example of building an ESP32 based sketch, which uses the Flux library.
122
+
The following is an example of building an ESP32 based sketch, which uses the Flux library.
124
123
125
124
Note that the location of the Flux library is passed in using the ```--library'`` switch, and that the ***full*** path to the Flux directory is provided. Using a relative path to the Flux library directory causes this command to fail
126
125
@@ -145,4 +144,4 @@ For reference, once the above compile command is completed, the resultant Firmwa
Copy file name to clipboardExpand all lines: docs/device_writing.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,9 @@ The return value should be one of the following:
111
111
|```flxDevConfidenceFuzzy``` | The algorithm has high-confidence in a match, but it's not exact|
112
112
|```flxDevConfidencePing``` | An address "ping" is used - just detecting a device at a location, but not verifying the device type.|
113
113
114
-
> Note: Only one device with a PING confidence is allowed at an address.
114
+
> [!note]
115
+
>
116
+
> Only one device with a PING confidence is allowed at an address.
115
117
116
118
#### Example Method Definition
117
119
@@ -174,9 +176,6 @@ Where `DeviceClassName` is the class name of the device being registered.
174
176
175
177
Once a device is registered, it is available for auto-detection and loading by the framework during the startup process of system.
176
178
177
-
> ![note]
178
-
> The ```flxRegisterDevice()``` call is a macro that defines a global object using a c++ template. The object is instantiated on system startup (all globals are), and in the constructor of the object, it registers itself with the device discovery system.
179
-
180
179
Building off the above BME280 example, the implementation looks like:
0 commit comments