Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to NeoPixelBus and add PlatformIO support #6

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3b22f0d
Reorganize files, add .gitignore
bbacskay Oct 13, 2019
4909b0f
Moving the user configuration into config.h
bbacskay Oct 13, 2019
8be85c1
Exclude the ./build folder from git.
bbacskay Oct 13, 2019
f14938d
Add ESP32 support
bbacskay Oct 13, 2019
9b4698e
Remove unnecessary checks. uint8_t is always between 0 and 255
bbacskay Oct 13, 2019
d45a77e
Add some debug code to see the memory usage
bbacskay Oct 13, 2019
9e41791
Use enum as effect instead of string comparison.
bbacskay Oct 13, 2019
edd45ae
Adding additional OTA code.
bbacskay Oct 13, 2019
1f82fac
Swap out the Adafruit_Neopixel library with NeoPixelBus library
bbacskay Oct 14, 2019
6a8e412
MQTT tweaks, adding last will and making the state retain.
bbacskay Oct 16, 2019
67d8c9e
Add availability to the example
bbacskay Oct 20, 2019
2502631
Reorganize files, add .gitignore
bbacskay Oct 13, 2019
4b81bb2
Moving the user configuration into config.h
bbacskay Oct 13, 2019
9ae306f
Exclude the ./build folder from git.
bbacskay Oct 13, 2019
766f3eb
Add ESP32 support
bbacskay Oct 13, 2019
e733526
Remove unnecessary checks. uint8_t is always between 0 and 255
bbacskay Oct 13, 2019
88c6f5a
Add some debug code to see the memory usage
bbacskay Oct 13, 2019
b562574
Use enum as effect instead of string comparison.
bbacskay Oct 13, 2019
e0bcd52
Adding additional OTA code.
bbacskay Oct 13, 2019
995262b
Swap out the Adafruit_Neopixel library with NeoPixelBus library
bbacskay Oct 14, 2019
d556762
MQTT tweaks, adding last will and making the state retain.
bbacskay Oct 16, 2019
ec0a41d
Add availability to the example
bbacskay Oct 20, 2019
7413e78
Merge changes from upstream
bbacskay May 3, 2020
0559f7b
PlatformIO initial configuration
bbacskay May 4, 2020
761293c
Update readme with target dependent firmware upload
bbacskay May 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch
build/
Sunrise/config.h
.pio
67 changes: 67 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Continuous Integration (CI) is the practice, in software
# engineering, of merging all developer working copies with a shared mainline
# several times a day < https://docs.platformio.org/page/ci/index.html >
#
# Documentation:
#
# * Travis CI Embedded Builds with PlatformIO
# < https://docs.travis-ci.com/user/integration/platformio/ >
#
# * PlatformIO integration with Travis CI
# < https://docs.platformio.org/page/ci/travis.html >
#
# * User Guide for `platformio ci` command
# < https://docs.platformio.org/page/userguide/cmd_ci.html >
#
#
# Please choose one of the following templates (proposed below) and uncomment
# it (remove "# " before each line) or use own configuration according to the
# Travis CI documentation (see above).
#


#
# Template #1: General project. Test it using existing `platformio.ini`.
#

# language: python
# python:
# - "2.7"
#
# sudo: false
# cache:
# directories:
# - "~/.platformio"
#
# install:
# - pip install -U platformio
# - platformio update
#
# script:
# - platformio run


#
# Template #2: The project is intended to be used as a library with examples.
#

# language: python
# python:
# - "2.7"
#
# sudo: false
# cache:
# directories:
# - "~/.platformio"
#
# env:
# - PLATFORMIO_CI_SRC=path/to/test/file.c
# - PLATFORMIO_CI_SRC=examples/file.ino
# - PLATFORMIO_CI_SRC=path/to/test/directory
#
# install:
# - pip install -U platformio
# - platformio update
#
# script:
# - platformio ci --lib="." --board=ID_1 --board=ID_2 --board=ID_N
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
]
}
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,32 @@ light:
rgb_state_topic: "SunriseMCU/colorState"
white_value_command_topic: "SunriseMCU/white"
white_value_state_topic: "SunriseMCU/whiteState"
availability_topic: "LWT/SunriseMCU"
payload_available: "Online"
payload_not_available: "Offline"
white_value_scale: 255
retain: true
```

## How to build with PlatformIO

1. Install PlatformIO Core <http://docs.platformio.org/page/core.html>
2. Clone the repo with git or download the sources as .zip and extract it
3. Change into the folder where the platformio.ini is
4. Run these commands:
```shell
# Download/Install project libraries
> platformio lib install

# Build project
> platformio run

# Upload firmware to NodeMCU 1.0
> platformio run -e nodemcuv2 --target upload

# Upload firmware to DOIT ESP32 DEVKIT V1
> platformio run -e esp32doit-devkit-v1 --target upload

# Clean build files
> platformio run --target clean

Loading