diff --git a/sensor433/.gitignore b/sensor433/.gitignore index 89cc49c..64727e5 100644 --- a/sensor433/.gitignore +++ b/sensor433/.gitignore @@ -3,3 +3,4 @@ .vscode/c_cpp_properties.json .vscode/launch.json .vscode/ipch +config.h \ No newline at end of file diff --git a/sensor433/README.md b/sensor433/README.md index f5bde8b..740c6bb 100644 --- a/sensor433/README.md +++ b/sensor433/README.md @@ -2,5 +2,8 @@ ![fritzing](sensor_Steckplatine.png) +# Build +Copy config.h.example to config.h and set your project specific settings there. + # flash attiny with minipro on linux and the TL866II plus after compiling: minipro -p attiny85 -w .pio/build/attiny85/firmware.hex \ No newline at end of file diff --git a/sensor433/platformio.ini b/sensor433/platformio.ini index 61af260..01e5dce 100644 --- a/sensor433/platformio.ini +++ b/sensor433/platformio.ini @@ -26,7 +26,11 @@ upload_speed = 19200 ; http://eleccelerator.com/fusecalc/fusecalc.php?chip=attiny85 board_build.f_cpu = 8000000L -force_verbose = true +force_verbose = True +; set environment variables in a python script for project specific settings +; does not work because variables not available in build! +; extra_scripts = +; pre:env.py ; Platformio Project Tasks -> Set Fuses! board_fuses.lfuse = 0xE2 diff --git a/sensor433/src/config.h.example b/sensor433/src/config.h.example new file mode 100644 index 0000000..fbf4a5f --- /dev/null +++ b/sensor433/src/config.h.example @@ -0,0 +1,5 @@ +#ifndef __CONFIG_H__ +#define __CONFIG_H__ + + +#endif \ No newline at end of file diff --git a/sensor433/src/main.cpp b/sensor433/src/main.cpp index e575fce..542f9c8 100644 --- a/sensor433/src/main.cpp +++ b/sensor433/src/main.cpp @@ -59,6 +59,10 @@ #include "dht22.h" dht22 dht; + +// Configuration, see file config.h.example and rename to config.h. Project specific, do not add to git! +#include "config.h" + #define RH_BUF_LEN 11 uint8_t rh_buf[RH_BUF_LEN] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};