-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
24403d2
commit 026fab4
Showing
12 changed files
with
271 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Compiling and Uploading | ||
|
||
## Compiling using Arduino CLI | ||
|
||
It is recommended to use the Arduino CLI for compiling and uploading your sketch. | ||
|
||
When using Arduino CLI, the sketch dependencies are managed; They are automatically downloaded and installed in in isolated folder when compiling. | ||
|
||
Dependencies on cores and libraries are defined in `sketch.yml`. | ||
|
||
[Read more](https://arduino.github.io/arduino-cli/latest/sketch-build-process/) | ||
|
||
To compile using the default profile (for generic ESP8266 modules): | ||
|
||
```shell | ||
arduino-cli compile | ||
``` | ||
|
||
### Uploading | ||
|
||
First, list connected boards: | ||
|
||
```shell | ||
arduino-cli board list | ||
``` | ||
|
||
Then, compile and upload after setting your desired port: | ||
|
||
```shell | ||
arduino-cli compile -u -p [YOUR_PORT] | ||
``` | ||
|
||
## Using Arduino IDE 1 | ||
|
||
### Installing core | ||
|
||
Follow these instructions to install the ESP8266 core to the Arduino IDE board manager: | ||
https://github.com/esp8266/Arduino#installing-with-boards-manager | ||
|
||
### Installing Libraries | ||
|
||
Arduino IDE 1 has no way of automatically managing and installing sketch dependencies from `sketch.yml`. | ||
|
||
Please refer to `sketch.yml` to install the correct cores and dependencies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Sequential Blinkers | ||
|
||
When you define multiple channels with blink presets that have the same `blinkInterval`, you can easily configure those channels as sequential by setting different blinking patterns. | ||
|
||
Example: | ||
```c++{6,15,24} | ||
const PROGMEM Preset presetBlinkerFirst[] = | ||
{ | ||
{ | ||
.modeID = BlinkL, | ||
.mode = PresetModes::Blink, | ||
.blinkPattern = 0b11111111111111111100000000000000 | ||
} | ||
}; | ||
const PROGMEM Preset presetBlinkerSecond[] = | ||
{ | ||
{ | ||
.modeID = BlinkL, | ||
.mode = PresetModes::Blink, | ||
.blinkPattern = 0b00000011111111111100000000000000 | ||
} | ||
}; | ||
const PROGMEM Preset presetBlinkerThird[] = | ||
{ | ||
{ | ||
.modeID = BlinkL, | ||
.mode = PresetModes::Blink, | ||
.blinkPattern = 0b00000000000011111100000000000000 | ||
} | ||
}; | ||
Channel channels[] = | ||
{ | ||
{ COUNT_OF(presetBlinkerFirst), presetBlinkerFirst }, | ||
{ COUNT_OF(presetBlinkerSecond), presetBlinkerSecond }, | ||
{ COUNT_OF(presetBlinkerThird), presetBlinkerThird }, | ||
}; | ||
const size_t channelsCount = COUNT_OF(channels); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# US tail lights | ||
...with combined brake lights and blinkers. | ||
|
||
Older North-American cars [use a single bulb](https://www.youtube.com/watch?v=O1lZ9n2bxWA) for tail lights, brake lights and turn signals. | ||
|
||
```c++ | ||
const PROGMEM Preset USTaillightPresets[] = | ||
{ | ||
{ .modeID = Parking, .intensity = 63 }, | ||
{ .modeID = Brake }, | ||
{ .modeID = BlinkL, .intensity = 0 }, | ||
{ .modeID = BlinkL, .mode = PresetModes::Blink }, | ||
}; | ||
``` | ||
In this example, the blinking light always alternates between fully off, and fully on, taking priority over the `Brake` and `Parking` presets. | ||
|
||
## Thunderbirds | ||
|
||
In some models, the tail lights are bit more [complicated](https://www.youtube.com/watch?v=Qwzxn9ZPW-M): The blinkers and brake lights are 'overlaid' over the parking lights. | ||
|
||
The hard part is letting the blinker take priority over the brake lights, while still taking the state of the parking lights into consideration. The following example achieves that effect: | ||
|
||
```c++{4,6} | ||
const PROGMEM Preset thunderbirdPresets[] = | ||
{ | ||
{ .modeID = Brake }, | ||
{ .modeID = BlinkL, .intensity = 0 }, | ||
{ .modeID = BlinkL, .mode = PresetModes::Blink }, | ||
{ .modeID = Parking, .priorityMode = SwopModes::HTP, .intensity = 63 }, | ||
}; | ||
``` | ||
|
||
At first glance, the order of the presets might be a little unconventional but here is how it works: | ||
|
||
In the example; | ||
* the `Brake` preset is cancelled by the first `BlinkL` preset. | ||
* the `Parking` preset has a `HTP` priority, which only applies the preset when the calculated channel intensity up to that point is **lower** than the preset intensity;<br> | ||
The intensity of the `Parking` preset is overlaid over the `0` intensity of the first `BlinkL` preset. | ||
|
||
_(How to combine this example with the [sequential blinkers](/guide/sequential-blinkers) is left as an exercise for the reader.)_ |
Oops, something went wrong.