I, and many others likely, would like to be able to grab your code from your first post and paste it in the IDE. Unfortunately, pasting that screen capture won't work, so please try code tags.
Since there's a good chance you have something miswired, a schematic would also be helpful; also, please see what the How To... has to say about that.
Do you have a model number for the sensor, or for the motor they're included in? I'm wondering about the sensor output type. Without that, I don't really know if your "wiring" makes sense, nor what your expectations should be for the signal on A0/A1/A2.
Also, since your code isn't controlling the motor, what is? Was it turning fast, slow, ???
Clearly we need to know a bit more to help you.
now, I already just fixed it. the main reason is the 50 hz of power from my charging adapter and another reason is I forgot to do an external pull-up for the Hall sensor signal. I am very glad that you are coming and helping me.