If you connect the relays as shown in the previous diagram, it will be physically impossible to supply power to open and close.
klakier_2006 wrote: Thanks for your interest in my problem, but can you tell me what the command to turn off the relays should sound like and where to enter it? I must admit that I am a total novice when it comes to arduino. As an attachment I am adding a file with my sketch. It is written for controlling two blinds.
For example, yes, if the appropriate RELAY1 and RELAY2 as well as RELAY3 and RELAY4 are responsible for controlling the shutters.
[syntax=c]
// Enable debug prints to serial monitor
#define MY_DEBUG
// Enable and select radio type attached
//#define MY_RADIO_NRF24
//#define MY_RADIO_RFM69
// 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.
//#define MY_RF24_PA_LEVEL RF24_PA_LOW
// Enable serial gateway
#define MY_GATEWAY_SERIAL
// Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
#if F_CPU == 8000000L
#define MY_BAUD_RATE 38400
#endif
// Flash leds on rx/tx/err
// #define MY_LEDS_BLINKING_FEATURE
// Set blinking period
// #define MY_DEFAULT_LED_BLINK_PERIOD 300
// Inverses the behavior of leds
// #define MY_WITH_LEDS_BLINKING_INVERSE
// 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 60
// Digital pin used for inclusion mode button
#define MY_INCLUSION_MODE_BUTTON_PIN 3
// Uncomment to override default HW configurations
//#define MY_DEFAULT_ERR_LED_PIN 4 // Error led pin
//#define MY_DEFAULT_RX_LED_PIN 6 // Receive led pin
//#define MY_DEFAULT_TX_LED_PIN 5 // the PCB, on board LED
#include
#include
#include
// Enable repeater functionality for this node
#define MY_REPEATER_FEATURE
#define RELAY_1 4 // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
#define RELAY_2 5
#define RELAY_3 6
#define RELAY_4 7
#define NUMBER_OF_RELAYS 4 // Total number of attached relays
#define RELAY_ON 0 // GPIO value to write to turn on attached relay
#define RELAY_OFF 1 // GPIO value to write to turn off attached relay
#define BUTTON_PIN A1
#define BUTTON2_PIN A2
#define BUTTON3_PIN A3
#define BUTTON4_PIN A4
void before() {
for (int sensor=1, pin=RELAY_1; sensor