@suresh-mali I now reading about that funktions in http://www.airspayce.com/mikem/arduino/AccelStepper/classAccelStepper.html#a344f58fef8cc34ac5aa75ba4b665d21c Did what You said, but getting error: no matching function for call to 'AccelStepper::runToPosition(int)' I paste here all code, but I think I did everything without mistakes: // Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached #define MY_NODE_ID 10 #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 // Enable repeater functionality for this node //#define MY_REPEATER_FEATURE #include <SPI.h> #include <MySensors.h> #include <AccelStepper.h> #define HALFSTEP 8 #define CURTAIN_CLOSED 10000 #define CURTAIN_OPEN 0 #define CHILD_ID 1 // int powerPin = 7; // definicje MySensors MyMessage message(CHILD_ID, S_COVER); // Definicja pinow silnika #define IN1 3 // IN1 #define IN2 4 // IN2 #define IN3 5 // IN3 #define IN4 6 // IN4 AccelStepper stepper1(HALFSTEP, IN1, IN3, IN2, IN4); void setup() { stepper1.setMaxSpeed(1000.0); stepper1.setAcceleration(100.0); stepper1.setSpeed(200); stepper1.runToPosition(CURTAIN_CLOSED); } void presentation() { sendSketchInfo("Roller blinds", "1.0"); present(CHILD_ID, S_COVER); // Window Cover sub-type, commands: V_UP, V_DOWN, V_STOP } void loop() { //stepper1.run(); //Start } void receive(const MyMessage &message) { stepper1.enableOutputs (); // if message = V_UP start moving until closed if (message.type==V_UP) { if (stepper1.distanceToGo() == 0){ if (stepper1.currentPosition() == CURTAIN_OPEN){ stepper1.runToPosition(CURTAIN_CLOSED); // Store state in eeprom saveState(message.sensor, message.getBool()); request(CHILD_ID, V_UP, 0); // request new values from controller } } } if (message.type==V_DOWN) { stepper1.moveTo(CURTAIN_OPEN); // Store state in eeprom saveState(message.sensor, message.getBool()); request(CHILD_ID, V_DOWN, 0); // request new values from controller } if (message.type==V_STOP) { stepper1.setCurrentPosition(0); // Store state in eeprom saveState(message.sensor, message.getBool()); request(CHILD_ID, V_STOP, 0); // request new values from controller } stepper1.disableOutputs (); }