need help with code for controlling a hydraulic press mode

PaulS:

  int stepsposition = HS1 + 2*HS2 + 3*HS3;

Given that HS1, HS2, and HS3 can be 0 or 1, how can you distinguish between HS1 = 1, HS2 = 1 and HS3 = 0 and HS1 = 0, HS2 = 0, and HS3 = 1? Both result in stepsposition being assigned the value of 3.

i know it's complicated, that's why i've been scratching my head for over a week :smiley:
the rotary switches give only 1 input to one of the pins with value = 1 per set of three. as i said before i have 2 groups of steps from 1 to 3. i forgot to mention, i'm using PULL_UP method to read the input. so the pins get connection to GND to have value =1.
so, in the void loop the reading is successful setting the correct reading for stepspressure stepsposition= HS1 + 2HS2 + 3HS3. it gives me a value of 1 to 3 for stepspressure stepsposition.

the incrementing of the count also is going well. but in the first loop until stepspressure1=stepspressure, it counts both. after the reseting of the value of stepspressure1=0, it restarts the counting....

so, the first loop is going both ways. i might have a problem with that, but since it's only a few steps i'll use the manual switch on the machine to start about 10 steps before i switch to Arduino take control.

EDIT: sorry for the confusion. i mixed the integers. i corrected with a strike-through :blush: