You are correct jremington. Upon checking my breadboard i realized i had drawn it completely wrong im new at drawing the schematics. Here is an updated picture of how i actually have it wired up.
so to recap i basically want my bush putton to change in between the 5 values i have stored.
then when i am ready the tilt switch is to turn on the dc motor at the pwm value that is currently stored.
its not doing that at all. the push button is simply switching the dc motor ON to the different pwm values.
the tilt switch is not turning it on or off. i wired the tilt switch like i wired the button. and the code seems ok but obviously not.
thanks a lot for the reply
