I'm using a PS3 controller to control a continuous servo array. I'm using the map function to write the servo position. The relevant part of my code is
servo1.writeMicroseconds(map(PS3.getAnalogHat(RightHatY), 0, 255, 1300, 1700));
My problem is that the joysticks don't usually reset back exactly to the midpoint which makes the servos slowly rotate when I want them to stay still. I want to ignore the input from 115 to 140 from the ps3 controller.
How would I go about doing this?