Need help modifyin the code to use a vibration switch instead of an analog senso

See my first answer

Give it a try: hardcode a behavior and see what it does

--> have stepFiltered be at 0 for 1000 loops and then increase stepFiltered from 600 to 900 for the next 300 loops and then at 0 again for 1000 loops

See what it does - practice a bit.