Using GetJoystickAccelerometer with EasyC

I was recently messing around with EasyC and noticed the GetJoystickAccelerometer function block, which allows you to tilt the controller to make certain motors move. I was wondering how I would use this (sample programs and what the variable would be). Specifically I would like to use this to make my intake tilt up and down by tilting the controller forward and back.

The same way you would use any other blocks. Create a variable, accelerometer returns int, and then use the variable. Give the variable to the motor. The way to go in easy c.

I have built an H drive last year, and I find using Y axis of accelerometer convenient for strafing, as I used to be a tank driver. However, remember to set deadband and protection program and all that good stuff. The intake always slightly turning can be very annoying sometimes.

True I didn’t really thing about how that could get annoying for and intake. But I might want to use it for our H-drive.

I agree. Probably you can set a big deadband and program a switch button so you can conveniently disable it any time.

How do I set this “deadband”?

if absolute-value-of x < someLargeMostLikelyArbitraryNumber
output = 0

output = x