Platform independency

This commit is contained in:
Stefan Ostermann 2021-04-10 19:00:26 +02:00
parent 662c934258
commit 42830e1200
2 changed files with 11 additions and 1 deletions

View File

@ -16,10 +16,12 @@ monitor_speed = 9600
lib_deps =
mikem/RadioHead@^1.113
;tzapu/WiFiManager@^0.16.0
build_flags = -D USE_ESPRESSIF
[env:nanoatmega328]
platform = atmelavr
board = nanoatmega328
framework = arduino
monitor_speed = 9600
lib_deps = mikem/RadioHead@^1.113
lib_deps = mikem/RadioHead@^1.113
build_flags = -D USE_ARDUINO

View File

@ -7,7 +7,15 @@
**/
#define RH_SPEED 1000
/**
* Pin for the receiver
**/
#if defined(USE_ARDUINO)
#define RH_RX_PIN 11
#elif defined(USE_ESPRESSIF)
#define RH_RX_PIN 12
#endif
#define RH_BUF_LEN 5
uint8_t rh_buf[RH_BUF_LEN];