use sensor based on precompile directive

This commit is contained in:
Nicu Hodos 2022-01-01 18:11:33 +01:00
parent 13fa62a9c3
commit 252f1c12fa
2 changed files with 2 additions and 1 deletions

View File

@ -18,6 +18,7 @@ lib_deps =
lib_extra_dirs = lib_extra_dirs =
../libraries ../libraries
~/Arduino/libraries ~/Arduino/libraries
build_flags = -D DHT_SENSOR=0
upload_protocol = stk500v1 upload_protocol = stk500v1
upload_flags = upload_flags =
-P$UPLOAD_PORT -P$UPLOAD_PORT

View File

@ -9,7 +9,7 @@
// Pins // Pins
#define SENDER PIN_B2 #define SENDER PIN_B2
#if !DHT #if !DHT_SENSOR
TempSensor &tempSensor = *(new Tmp36Sensor(TEMP_SENSOR)); TempSensor &tempSensor = *(new Tmp36Sensor(TEMP_SENSOR));
#else #else
TempSensor& tempSensor = *(new Dht22Sensor(TEMP_SENSOR)); TempSensor& tempSensor = *(new Dht22Sensor(TEMP_SENSOR));