maybe someone could clearify this for me, I'm trying to control servo with adxl335, I read the datasheet but what is the range that I'm supposed to map?
there is a number in the datasheet showing ratiometric 270 to 330
I tried mapping it to 0-179 of the servo but it doesn't do anything
the sweeping sketch works, I also tried hooking up the acclerometer and getting values with the adxl3XX sketch, for x-axis it reads 414 to 630. I tried mapping that and still doesn't work.
Do I have to do some sort of conversion or am I just doing something wrong cus right now I just want to be able to map the x-axis to the servo so I could tilt the accelerometer from one extreme to the other and the servo will rotate the range of 0-180.
I was using the code
val = map(val, 0, 1023, 0, 179);
but of course I change the value of the 0, and 1023 to the other values I posted above