How to send Pull Request to CommunitySubmitted

First fork the GitHub - myDevicesIoT/Cayenne-MQTT-Arduino: Cayenne MQTT Arduino Library repository. Then create the code for your particular sensor under the examples/CommunitySubmitted folder and test it out thoroughly. You can also submit your code to the community for further feedback and improvements. Then submit a pull request with your example code to the Cayenne-MQTT-Arduino repository.

Points to keep me mind while sending a pull request.

  1. All example sketch code must be created in examples/ CommunitySubmitted folder. Cayenne-MQTT-Arduino/examples/CommunitySubmitted at master · myDevicesIoT/Cayenne-MQTT-Arduino · GitHub
  2. The .ino file should be inside a new folder with the same name as the file. Eg Cayenne-MQTT-Arduino/examples/CommunitySubmitted/NewExample/NewExample.ino.
  3. The following info needs to be in a comment at the top of the example sketch. See other example sketches for how this is currently done.
  • Any additional libraries needed.
  • How to connect the sensor with the Arduino.
  • How to assign the virtual pin.
  1. Use the #define CAYENNE_PRINT Serial define at the top of the sketch before any includes unless it needs to be disabled because it conflicts with the example sketch.

  2. Use the default #include <CayenneMQTTEthernet.h> header unless the example must use a specific board.

  3. Use CAYENNE_OUT and CAYENNE_IN for sending/receiving data, if at all possible.

  4. Use all caps #defines for constants like channel numbers.

  5. Keep indentation consistent for readability.

  6. Use the correct Cayenne data types and units for your data.

  7. Comment any additional info about the code if needed.

Once a pull request is sent, we will examine the code and add comments if any changes are needed. When the code looks good we will merge in the pull request.

1 Like