Skip to content

Commit

Permalink
More work on #4 for getting RTD up and running
Browse files Browse the repository at this point in the history
  • Loading branch information
florianL21 committed Apr 2, 2021
1 parent 5e1d84f commit 8df2ce5
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 30 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ doc/_build
doc/_static
doc/_templates
doc/doxygen
doc/doxyapi

# Created by https://www.gitignore.io/api/platformio
# Edit at https://www.gitignore.io/?templates=platformio
Expand Down
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<img src="https://github.com/florianL21/LED-ClockShelf/blob/master/doc/images/Animation.gif?raw=true" alt="Animation example"/>
</p>

This is the software of a variation of the LED clock from [here.](https://www.instructables.com/id/How-to-Build-a-Giant-Hidden-Shelf-Edge-Clock/)
I have a separate branch with a ready to use configuration which works on the original version of this clock out of the box [here](https://github.com/florianL21/LED-ClockShelf/tree/diy-machines-version)
This is the software of a variation of the LED clock from [DIY Machines](https://www.instructables.com/id/How-to-Build-a-Giant-Hidden-Shelf-Edge-Clock/)
A configuration which works on the original version of the clock is also part of the source code.

I decided to code it completely from scratch at I wanted to use a ESP32 instead of the Arduino nano and RTC that is used in the original project.
This enables some cool features like smartphone app control, OTA updates and fetching of the time using the internet.
Expand All @@ -14,11 +14,11 @@ Further animations can be easily added and existing animation can be adjusted to

The whole codebase is highly modular and configurable and can be tweaked exactly to your preferences.

Detailed documentation is available on the [Wiki.](https://github.com/florianL21/LED-ClockShelf/wiki)
Detailed documentation is available on the [Wiki.](https://giant-led-clock.readthedocs.io/)

If you are interested in my variation of the design which uses a lot of wood instead of the 3D prints and is a bit bigger than the original you can find it on [thingiverse here](https://www.thingiverse.com/thing:4352352)

# Development Environment:
## Development Environment:

I am using VScode with PlatformIO.
VSCode can be downloaded from [here.](https://code.visualstudio.com/)
Expand All @@ -29,9 +29,5 @@ Via the PlatformIO home the following libraries have to be installed:
* "FastLED" by Daniel Garcia
* "LinkedList" by Ivan Seidel

# Important files for configuration:
Files that are important for configuration (sorted by importance):
1. At the top of /include/Configuration.h -> Contains almost all important settings, like WIFI config, pin configurations etc.
2. /src/DisplayManager/DisplayConfiguration.cpp -> Configuration of which leds belong to which segments and which segments belong to which display, the order of the segments and their animation directions *It is really important to get this one right!*
3. /src/SevenSegment/SegmentTransitions.cpp -> Configuring the animations between the digits
4. /src/DisplayManager/Animations.cpp -> configuration of animations like the loading animation
## Getting started
To get started with setting everything up take a look at the [Wiki.](https://giant-led-clock.readthedocs.io/)
4 changes: 2 additions & 2 deletions doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -2134,7 +2134,7 @@ MACRO_EXPANSION = NO
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

EXPAND_ONLY_PREDEF = NO
EXPAND_ONLY_PREDEF = YES

# If the SEARCH_INCLUDES tag is set to YES, the include files in the
# INCLUDE_PATH will be searched if a #include is found.
Expand Down Expand Up @@ -2166,7 +2166,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED =
PREDEFINED = "IRAM_ATTR="

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
Expand Down
33 changes: 27 additions & 6 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
import os
import sys
import subprocess
# sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('..'))
# sys.path.insert(0, os.path.abspath('../lib/LED_clock/Config/Setup'))


subprocess.call('doxygen', shell=True)
# subprocess.call('doxygen', shell=True)



Expand All @@ -30,25 +30,46 @@
# The full version, including alpha/beta/rc tags
release = '2.0.0'

primary_domain = 'c'
primary_domain = 'cpp'
highlight_language = 'cpp'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["breathe"]
extensions = ["breathe", "m2r2", 'exhale']

breathe_projects = { "LED-Clock": "./doxygen/xml" }

breathe_default_project = "LED-Clock"

import textwrap
# Setup the exhale extension
exhale_args = {
"containmentFolder": "./doxyapi",
"rootFileName": "library_root.rst",
"rootFileTitle": "Library API",
"doxygenStripFromPath": "..",
"createTreeView": True,
"exhaleExecutesDoxygen": True,
"exhaleDoxygenStdin": textwrap.dedent('''
INPUT = ../lib
PREDEFINED += "IRAM_ATTR="
EXCLUDE = ../lib/LED_clock/Config/Animations/clock-only \
../lib/LED_clock/Config/Animations/diy-machines \
../lib/LED_clock/Config/Setup/diy-machines \
../lib/LED_clock/Config/Setup/clock-only
''')
}

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'doxygen']

source_suffix = ['.rst', '.md']

# -- Options for HTML output -------------------------------------------------

Expand Down
16 changes: 9 additions & 7 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
Welcome to LED-Clock's documentation!
=====================================
.. mdinclude:: ../README.md

.. toctree::
:maxdepth: 2

GeneralConfiguration
AvailableAnimations
######################
Where to go from here
######################

.. toctree::
:maxdepth: 2

WIP
sites/GeneralConfiguration
sites/AvailableAnimations
doxyapi/library_root


Indices and tables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@

.. _available-animations:

#####################
Available Animations
=====================================
#####################

Only the default animations are listed here as this documentation only covers one configuration

********
Default
=====================================
********
.. doxygenfile:: Animations.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@

.. _general-configuration:

######################
General Configuration
=====================================
######################

*********************
Display configuration
=====================================
*********************
.. doxygengroup:: DisplayConfiguration

*************************
Configuration parameters
=====================================
*************************
.. doxygengroup:: MainConfiguration
32 changes: 32 additions & 0 deletions lib/LED_clock/library.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "LED_Clock-Only",
"version": "1.0.0",
"build": {
"srcFilter": [
"+<Modules/*.c>",
"+<Modules/*.cpp>",
"+<Modules/**/*.cpp>",
"+<Modules/**/*.c>",
"+<Config/Animations/clock-only/*.c>",
"+<Config/Animations/clock-only/*.cpp>",
"+<Config/Blynk/default/*.c>",
"+<Config/Blynk/default/*.cpp>",
"+<Config/Setup/clock-only/*.c>",
"+<Config/Setup/clock-only/*.cpp>",
"+<Config/Transitions/default/*.c>",
"+<Config/Transitions/default/*.cpp>"
],
"flags": [
"-I Modules/Animator/inc",
"-I Modules/ClockState/inc",
"-I Modules/DisplayManager/inc",
"-I Modules/Misc/inc",
"-I Modules/SevenSegment/inc",
"-I Modules/TimeManager/inc",
"-I Config/Setup/clock-only",
"-I Config/Blynk/default",
"-I Config/Animations/clock-only",
"-I Config/Transitions/default"
]
}
}

0 comments on commit 8df2ce5

Please sign in to comment.