Changing code to work with Arduino Gateway vs ZFM-80

Currently I have two of my vertical blinds controlled by the following code. Utilizing and Arduino Nano 3.0, Stepper 28byj-48, ULN2003 and Remotec ZFM-80. They where getting expensive with the ZFM-80. Thus the reason I have built the gateway.

What I am wanting to do now is use Nano 3.0, 28byj-48, uln2003 & NRF24L01 to finish the homes remaining 3 blinds. Wondering if someone could help with explaining what additional code I would need to add to the below code that is currently working in my first example with the ZFM-80 but will not be utilized with my proposed NRF24L01 solution.

I am hoping to utilize
[url=http://code.mios.com/trac/mios_arduino-sensor/wiki/ServoActuator]ServoActuator[/url] – Arduino Sensor Plugin

parts of this code so I can actually get a correct picture of the “blinds” to appease the wife that complains currently with the zfm-80 that it shows a light bulb on her phone app.

[code]/**

  • This sketch waits for the button to be pressed. The motor starts in forward direction,
  • then every time the button is pressed the motor moves in the other direction.
    */
    #include <StepperMotor.h>

// 4 pins of the stepper motor board
#define _PIN1 11
#define _PIN2 10
#define _PIN3 9
#define _PIN4 8

// define states that will have
//#define S_None 1
//#define S_Forward 2
//#define S_Stop 3
//#define S_Reverse 4
int stage =1; //set up initial state.
int buttonPin = 7;
StepperMotor stepper(_PIN1, _PIN2, _PIN3, _PIN4);

void setup()
{
pinMode(13,OUTPUT);
pinMode(_PIN1, OUTPUT);
pinMode(_PIN2, OUTPUT);
pinMode(_PIN3, OUTPUT);
pinMode(_PIN4, OUTPUT);
pinMode(buttonPin, INPUT);
}

void loop()
{
switch(stage)
{
case 1:
//we loop here and do nothing UNLESS BUTTON IS PUSHED.
if (digitalRead(buttonPin) == LOW) stage ++;
break;
case 2:
stepper.move(8192); //stepper will stop after 8192 steps
stage ++;
break;
case 3:
//wait for button to be pushed
if (digitalRead(buttonPin) == LOW) stage ++;
break;
case 4:
stepper.move(-8192); //stepper will stop after 8192 steps
stage = 1; //go back to start
break;
default: //in case stage somehow gets outside 1 - 4
stage = 1; //go back to start
break;
}
}[/code]