MySensors Library & Examples  2.3.2
LogOTAGateway.ino
1 
43 // Enable debug prints to serial monitor
44 #define MY_DEBUG
45 
46 // Enable OTA log display
47 #define MY_OTA_LOG_RECEIVER_FEATURE
48 
49 // Enable and select radio type attached
50 #define MY_RADIO_RF24
51 //#define MY_RADIO_NRF5_ESB
52 //#define MY_RADIO_RFM69
53 //#define MY_RADIO_RFM95
54 
55 // Set LOW transmit power level as default, if you have an amplified NRF-module and
56 // power your radio separately with a good regulator you can turn up PA level.
57 #define MY_RF24_PA_LEVEL RF24_PA_LOW
58 
59 // Enable serial gateway
60 #define MY_GATEWAY_SERIAL
61 
62 // Define a lower baud rate for Arduinos running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
63 #if F_CPU == 8000000L
64 #define MY_BAUD_RATE 38400
65 #endif
66 
67 // Enable inclusion mode
68 #define MY_INCLUSION_MODE_FEATURE
69 // Enable Inclusion mode button on gateway
70 //#define MY_INCLUSION_BUTTON_FEATURE
71 
72 // Inverses behavior of inclusion button (if using external pullup)
73 //#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
74 
75 // Set inclusion mode duration (in seconds)
76 #define MY_INCLUSION_MODE_DURATION 60
77 // Digital pin used for inclusion mode button
78 //#define MY_INCLUSION_MODE_BUTTON_PIN 3
79 
80 // Set blinking period
81 #define MY_DEFAULT_LED_BLINK_PERIOD 300
82 
83 // Inverses the behavior of leds
84 //#define MY_WITH_LEDS_BLINKING_INVERSE
85 
86 // Flash leds on rx/tx/err
87 // Uncomment to override default HW configurations
88 //#define MY_DEFAULT_ERR_LED_PIN 4 // Error led pin
89 //#define MY_DEFAULT_RX_LED_PIN 6 // Receive led pin
90 //#define MY_DEFAULT_TX_LED_PIN 5 // the PCB, on board LED
91 
92 #include <MySensors.h>
93 
94 void setup()
95 {
96  // Setup locally attached sensors
97 }
98 
100 {
101  // Present locally attached sensors
102 }
103 
104 void loop()
105 {
106  // Send locally attached sensor data here
107 }
API declaration for MySensors.
void setup()
Called after node initialises but before main loop.
void presentation()
Node presentation.
void loop()
Main loop.