Fixes LED issues as discussed in #562

Removing MY_LED_BLINKING_FEATURE, as we now are
using MY_DEFAULT_LED_xx_PIN defines to enable
LED blinking feature.

updated Gateway sketches to not refer to
MY_LED_BLINKING_FEATURE any more

fixes #562
This commit is contained in:
Thomas Mørch
2016-08-20 09:35:49 +02:00
parent c925dd6f5e
commit 15b46f8023
15 changed files with 216 additions and 276 deletions
@@ -19,23 +19,22 @@
*******************************
*
* DESCRIPTION
* The RS485 Gateway prints data received from sensors on the serial link.
* The RS485 Gateway prints data received from sensors on the serial link.
* The gateway accepts input on seral which will be sent out on
* the RS485 link.
*
* Wire connections (OPTIONAL):
* - Inclusion button should be connected between digital pin 3 and GND
* - Inclusion button should be connected between digital pin 3 and GND
* - RX/TX/ERR leds need to be connected between +5V (anode) and digital pin 6/5/4 with resistor 270-330R in a series
*
* LEDs (OPTIONAL):
* - To use the feature, uncomment MY_LEDS_BLINKING_FEATURE in MyConfig.h
* - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
* - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
* - ERR (red) - fast blink on error during transmission error or recieve crc error
*
* The gateway uses AltSoftSerial to handle two serial links
* - ERR (red) - fast blink on error during transmission error or recieve crc error
*
* The gateway uses AltSoftSerial to handle two serial links
* on one Arduino. Use the following pins for RS485 link
*
*
* Board Transmit Receive PWM Unusable
* ----- -------- ------- ------------
* Teensy 3.0 & 3.1 21 20 22
@@ -46,16 +45,16 @@
* Arduino Mega 46 48 44, 45
* Wiring-S 5 6 4
* Sanguino 13 14 12
*
*
*/
// Enable debug prints to serial monitor
#define MY_DEBUG
#define MY_DEBUG
// Enable RS485 transport layer
#define MY_RS485
// Define this to enables DE-pin management on defined pin
// Define this to enables DE-pin management on defined pin
#define MY_RS485_DE_PIN 2
// Set RS485 baud rate to use
@@ -64,39 +63,34 @@
// Enable serial gateway
#define MY_GATEWAY_SERIAL
// Flash leds on rx/tx/err
#define MY_LEDS_BLINKING_FEATURE
// Set blinking period
#define MY_DEFAULT_LED_BLINK_PERIOD 300
// Enable inclusion mode
#define MY_INCLUSION_MODE_FEATURE
// Enable Inclusion mode button on gateway
#define MY_INCLUSION_BUTTON_FEATURE
// Set inclusion mode duration (in seconds)
#define MY_INCLUSION_MODE_DURATION 60
#define MY_INCLUSION_MODE_DURATION 60
// Digital pin used for inclusion mode button
#define MY_INCLUSION_MODE_BUTTON_PIN 3
#define MY_INCLUSION_MODE_BUTTON_PIN 3
// Set blinking period
#define MY_DEFAULT_LED_BLINK_PERIOD 300
// Flash leds on rx/tx/err
#define MY_DEFAULT_ERR_LED_PIN 4 // Error led pin
#define MY_DEFAULT_RX_LED_PIN 5 // Receive led pin
#define MY_DEFAULT_TX_LED_PIN 6 // the PCB, on board LED
#include <MySensors.h>
#include <MySensors.h>
void setup() {
void setup() {
// Setup locally attached sensors
}
void presentation() {
// Present locally attached sensors
// Present locally attached sensors
}
void loop() {
// Send locally attached sensor data here
void loop() {
// Send locally attached sensor data here
}