Added configuration to config.h, splitted master code from main.

This commit is contained in:
Dirk Jahnke
2018-10-19 23:48:54 +02:00
parent 3b107cd653
commit d67b0f672a
5 changed files with 122 additions and 75 deletions

View File

@@ -1,3 +1,15 @@
# FREMO Fast Clock
This is a fast clock implementation based on a 2.4GHz wireless transmission layer based on NRF24 controllers.
This is a fast clock implementation based on a 2.4GHz wireless transmission layer based on NRF24 controllers. The software runs in two modes: Master or Client. A GPIO pin decides which role the hardware should play.
The definitions in config.h define the ports to be used:
- PIN_MASTER_CLIENT_SELECT defines the pin to be used to identifiy master or client. If that pin is LOW, then master is identified.
- PIN_NRF24_CE defines the pin that is used for the CE signal
- PIN_NRF24_CSN defines the pin that is used for the CSN signal
- PIN_RELAY1 defines the pin that controls relay 1
- PIN_RELAY2 defines the pin that controls relay 2
- DEFAULT_HOLD_RELAY_MS 150
- DEFAULT_MIN_RELAY_OFF_TIME_MS 80
- DEFAULT_RELAY_ACTIVE_LOW true
Depending of the controller used, an SD1306 controlled display can be used. See the "-D WITH_DISPLAY" flag in the build_flags definition of the appropriate environment.