hi all. So i've built a arduino powered radial arm saw/grinder for cutting thick metal plate and it works perfectly going back and forth slowing cutting thru the metal. I'm in the process of adding a feed screw that will lower the saw a little after each pass, and had a quick question.
a snipit of code of it is this below.
int feedReading = analogRead(A1);
int feedStep = map(feedReading, 1, 1023, 0, 200);
This would give me movement of the stepper feedscrew from 0 steps to 200 steps on each pass. But regarding the map function, is it permissible to change it to: map(feedReading, 1, 1023, -200, 200) so i can have both forward and backward movement for the stepper while using the same Pot? so the middle range of the Pot would be 0, and the low range on the pot would go backwards, and the upper range of the pot moves it forward?
Is there any issue with doing it like this? It's going to be tonight before i'm able to upload the new code and actually try it out once i finish fabbing the stepper's feedscrew and get it mounted to the saw, so i figured i'd ask because i've never tried running negative numbers in the map function and didn't know if it would work like i think it would.
thanks