need help, i will pay $$$

need help with coding:
when limit back ==LOW - reach i won it if take steps and read 3.3v or 0v for sensor 11 pin

  1. outA = 400; (from 0 - 400 steps - 3.3v)
    2.than in = 17000; (from 401 - 17400steps -0v)
  2. outB = 4000; (from 17401 - 21400steps -3.3v)
    4.when all steps reach then need send till front limit reach and is == low and show 3.3v
    some think like that

int sensor = 11;
int outA;
int in;
int outB;
long allSteps;
// void setup

pinMode (sensor, OUTPUT);
outA = 400;
in = 17000;
outB = 4000;

// void loop

if(value_limitBack == LOW) //when low need if start reading steps and 3.3v or 0v
outA-400 steps-3.3v {
analogWrite (sensor,170);
in-17000 steps-0v {
analogWrite (sensor,0);
outb-4000steps -3.3v){
analogWrite (sensor,170); after reach all steps if send to front limit and stops
if(value_limitFront == LOW) {
analogWrite (sensor,170);
i'm not programmer and looks terrible but i hope understand what i won it

Aehm ... what is the question?

Please go and read the How to use this Forum sticky first.

Then you know not only how to properly post code, but also what kind of other information we need about your project, as for now I have no idea what you have and what you want changed.

"need for that code:" and presenting "the code" is no question, its like saying "nee that apple:" and presenting an apple to a person - now does that mean "A wants that apple and asks B if he can have it" or does it mean "B, do you want this apple?" or is it something totally different, e.g. "B, is this an apple I could need?"

Nice analogy, but you forgot to add: "... without saying what that apple would possibly be used for".

Sorry, but I still have not found the question.

So I get it a little.
I can see the question or “I need” part
but not 100% understanding either.

Getting two voltages from the same pin is hard.
perhaps use two pins with a resistor divider setup.
Is analogwrite a pwm function ? there is no DAC on the atmels?

Unless you mean you only need 3.3v maximum to sensor.
If so then it is easy, my confusion.

What you need, counting and changing a pin or two, is easy to do
but I think the hard part is the understanding exactly your needs

This is at least more readable to start.

//sorry,but i new,im not programmer and it is not my 1st #2 is code what i have at that moment fully working
//-moving table-
//when turn on move automatic to front position(limitFront),
//when press btnfront table move till backlimit reach,
//if press btnback send to front position till limit front reach...

//i won it emulate signal fro  PHOTO INTERRUPTER SENSOR( on arduino nano PIN11 and put in on that #2  code)- 
//sends high or low on correct position and correct time count steps and voltage..
//on arduino nano means 5v and 0v,
//but i need 3.3v and 0v for that can use analogwrite....

//i need when limit back is pressed/low it start to count 
//when stepper motor moves-400 motor steps and give 3.3v(on digital pin 11),
//after 17000 motor steps give 0v(on digital pin 11),
//after 4000 motor steps  and give 3.3v(on digital pin 11),
//when all steps done-count need 
//if send automatic  till front limit reach and show 3.3v (on pin 11)and stops 

#include <Bounce2.h>
#define Pin_btnFront 4
#define Pin_btnBack 5

#define Pin_motorDir 6
#define Pin_motorStep 7 
#define Pin_limitBack 9
#define Pin_sensor 11 
#define Pin_limitFront 12
#define Pin_enable 13 

int COUNT_outA = 400; //steps 3.3v
int COUNT_in = 17000; //steps 0v
int COUNT_outB = 4000; //steps 3.3v
long COUNT_allSteps = 21400;

int stepcount = 0;

// Instantiate a Bounce object
Bounce btnFront = Bounce();
Bounce btnBack = Bounce();
Bounce limitBack = Bounce();
Bounce limitFront = Bounce();

boolean do_front = false;
boolean do_back  = false;

void setup() {
  pinMode(Pin_sensor, OUTPUT);
  digitalWrite(Pin_sensor, LOW);
  pinMode(Pin_motorDir, OUTPUT);
  pinMode(Pin_motorStep, OUTPUT);  
  pinMode(Pin_enable, OUTPUT);
  digitalWrite(Pin_enable, HIGH);

  // Setup the first button with an internal pull-up :
  pinMode(Pin_btnFront, INPUT_PULLUP);
  // After setting up the button, setup the Bounce instance :
  btnFront.interval(5); // interval in ms

  pinMode(Pin_btnBack, INPUT_PULLUP);

  pinMode(Pin_limitFront, INPUT_PULLUP);

  pinMode(Pin_limitBack, INPUT_PULLUP);

void stepmotor (int dval){
  digitalWrite(Pin_motorStep, HIGH); 
  digitalWrite(Pin_motorStep, LOW);

//  if (do_back){stepcount--;}
//  if (do_front){stepcount++;}
  if (stepcount == COUNT_outA){;}
  if (stepcount == COUNT_outB){;}
  if (stepcount == COUNT_in){;}

void goBack() {
  digitalWrite(Pin_motorDir, HIGH);
  stepcount = 0;
  while ( == HIGH) {
    //btnBack.update(); if ( != LOW) {break;}
    stepmotor (250);    
    if ( == LOW) {
      do_back = false;
      do_front = true;
  do_back = false;
  do_front = false;

void goFront() {
  digitalWrite (Pin_motorDir, LOW);
  stepcount = 0;
  while ( == HIGH) {
    //btnFront.update(); if ( != LOW) {break;}
    stepmotor (250);    
    if ( == LOW) {
      do_back = true;
      do_front = false;
  do_back = false;
  do_front = false;

void loop() {
  // Update the Bounce instances :
  btnFront.update(); btnBack.update();
  limitFront.update(); limitBack.update();
  // Get the updated value :
//  int value_limitFront =;
//  int value_limitBack =;
  if ( == LOW) {do_front = true;}
  if ( == LOW) {do_back = true;}

  if (do_front) {goFront();}
  if (do_back) {goBack();}

post #2 is code what i have at that moment

Not a lot then