Advertisement
Guest User

Untitled

a guest
Jun 25th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. #define MY_DEBUG
  2.  
  3.  
  4. // Enable and select radio type attached
  5. //#define MY_RADIO_NRF24
  6. //#define MY_RADIO_NRF5_ESB
  7. //#define MY_RADIO_RFM69
  8. //#define MY_RADIO_RFM95
  9.  
  10. // Set LOW transmit power level as default, if you have an amplified NRF-module and
  11. // power your radio separately with a good regulator you can turn up PA level.
  12. //#define MY_RF24_PA_LEVEL RF24_PA_LOW
  13.  
  14. // Enable serial gateway
  15. #define MY_GATEWAY_SERIAL
  16. #define MY_BAUD_RATE 38400
  17. // Define a lower baud rate for Arduinos running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
  18. //#if F_CPU == 8000000L
  19. //#define MY_BAUD_RATE 38400
  20. //#endif
  21.  
  22. // Enable inclusion mode
  23. #define MY_INCLUSION_MODE_FEATURE
  24. // Enable Inclusion mode button on gateway
  25. //#define MY_INCLUSION_BUTTON_FEATURE
  26.  
  27. // Inverses behavior of inclusion button (if using external pullup)
  28. //#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
  29.  
  30. // Set inclusion mode duration (in seconds)
  31. #define MY_INCLUSION_MODE_DURATION 60
  32. // Digital pin used for inclusion mode button
  33. //#define MY_INCLUSION_MODE_BUTTON_PIN 3
  34.  
  35. // Set blinking period
  36. #define MY_DEFAULT_LED_BLINK_PERIOD 300
  37.  
  38. // Inverses the behavior of leds
  39. //#define MY_WITH_LEDS_BLINKING_INVERSE
  40.  
  41. // Flash leds on rx/tx/err
  42. // Uncomment to override default HW configurations
  43. //#define MY_DEFAULT_ERR_LED_PIN 4 // Error led pin
  44. //#define MY_DEFAULT_RX_LED_PIN 6 // Receive led pin
  45. //#define MY_DEFAULT_TX_LED_PIN 5 // the PCB, on board LED
  46.  
  47. #include <MySensors.h>
  48.  
  49. #define CHILD_ID_czujnik1 1 //TO DOPISAŁEM DO PRZYKŁADU GATEWAYSERIAL
  50.  
  51. MyMessage msg_czujnik1(CHILD_ID_czujnik1, V_PERCENTAGE); //TO DOPISAŁEM DO PRZYKŁADU GATEWAYSERIAL
  52.  
  53.  
  54. void presentation()
  55. {
  56. sendSketchInfo("XXX", "1.0"); //TO DOPISAŁEM DO PRZYKŁADU GATEWAYSERIAL
  57. present(CHILD_ID_czujnik1, S_DIMMER); //TO DOPISAŁEM DO PRZYKŁADU GATEWAYSERIAL
  58. }
  59. void setup()
  60. {
  61. send(msg_czujnik1.set(1)); // wysyła dane raz na sztywno
  62. }
  63. void loop()
  64. {
  65. // Send locally attached sensor data here
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement