//https://github.com/mysensors/MySensors/blob/master/MyConfig.h // Enable debug prints to serial monitor // #define MY_DEBUG // #define MY_DEBUG_VERBOSE_GATEWAY // #define MY_DEBUG_VERBOSE_RF24 // Enable and select radio type attached #define MY_RADIO_RF24 //#define MY_RADIO_NRF5_ESB //#define MY_RADIO_RFM69 //#define MY_RADIO_RFM95 // Set LOW transmit power level as default, if you have an amplified NRF-module and // power your radio separately with a good regulator you can turn up PA level. /** * @def MY_RF24_PA_LEVEL * @brief Default RF24 PA level. Override in sketch if needed. * * - RF24_PA_MIN = -18dBm * - RF24_PA_LOW = -12dBm * - RF24_PA_HIGH = -6dBm * - RF24_PA_MAX = 0dBm */ #define MY_RF24_PA_LEVEL RF24_PA_MAX //#define MY_RF24_CE_PIN (12) //#define MY_RF24_CS_PIN (13) //#define MY_RF24_IRQ_PIN (5) // #define MY_RF24_IRQ_PIN (2) // Enable serial gateway #define MY_GATEWAY_SERIAL // Define a lower baud rate for Arduinos running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender) // #if F_CPU == 8000000L // #define MY_BAUD_RATE 38400 // #endif // Enable inclusion mode #define MY_INCLUSION_MODE_FEATURE // Enable Inclusion mode button on gateway #define MY_INCLUSION_BUTTON_FEATURE // Inverses behavior of inclusion button (if using external pullup) //#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP // Set inclusion mode duration (in seconds) #define MY_INCLUSION_MODE_DURATION 180 // Digital pin used for inclusion mode button #define MY_INCLUSION_MODE_BUTTON_PIN 3 // Set blinking period #define MY_DEFAULT_LED_BLINK_PERIOD 300 // Inverses the behavior of leds //#define MY_WITH_LEDS_BLINKING_INVERSE // Flash leds on rx/tx/err // Uncomment to override default HW configurations #define MY_DEFAULT_RX_LED_PIN 4 // Receive led pin #define MY_DEFAULT_TX_LED_PIN 5 // the PCB, on board LED #define MY_DEFAULT_ERR_LED_PIN 6 // Error led pin #define MY_RF24_CHANNEL 14 // #define MY_SIGNING_SIMPLE_PASSWD "C@KptBi1L@5op?8!" // #define MY_SECURITY_SIMPLE_PASSWD "C@KptBi1L@5op?8!" // #define MY_LINUX_SERIAL_PORT "/dev/ttyMSGW_CH14" /** * @def MY_RX_MESSAGE_BUFFER_FEATURE * @brief This enables the receiving buffer feature. * * This feature is currently not supported for anything but RF24. * Require @ref MY_RF24_IRQ_PIN to be set. * * Note: Not supported on ESP8266, ESP32, STM32, nRF5 and sketches * that use SoftSPI. See below issue for details * https://github.com/mysensors/MySensors/issues/1128 */ // #define MY_RX_MESSAGE_BUFFER_FEATURE /** * @def MY_BAUD_RATE * @brief Serial output baud rate (debug prints and serial gateway speed). * * The baud rate configured here must match the baud rate at the "other" end. * * @warning Depending on your target device and clock speed, certain baud rates might not work well. */ // #define MY_BAUD_RATE (115200ul) #include void setup() { // Setup locally attached sensors // Serial.println('setup'); } void presentation() { // Serial.println('presentation'); // Present locally attached sensors } void loop() { // Serial.println('loop'); // Send locally attached sensor data here }