hey every one!
I've been testing a SW-18010p. here is the link
but I always get HIGH on my Do pin. I also measured the voltage using a multimeter and still get HIGH on pin Do and it doesn't change when I knock the sensor. why is that?
please help!
hey every one!
I've been testing a SW-18010p. here is the link
but I always get HIGH on my Do pin. I also measured the voltage using a multimeter and still get HIGH on pin Do and it doesn't change when I knock the sensor. why is that?
please help!
Wire the sensor between an input pin and ground. Then in the setup function enable the internal pull ups in the pinMode function call for that pin.
Then when you knock it it will change the state of the pin.
What code are you using? The pin state will change for only a very short time, too quick to see on a meter but plenty slow enough to be detected by an Arduino.
Is it the sensor or the board you have?
You might have to put the sensor in contact with a small toy electric motor To get enough vibrations to measure.
Dear Grumpy_Mike
I use the board, as I have linked above. I used an LED to monitor the changes, in the way that when the Do pin is HIGH, the LED turns on and otherwise it is off. but I only see the LED being HIGH...
why is that?
The pin state will change for only a very short time, too quick to see on a meter
Or your eyes.
in the way that when the Do pin is HIGH, the LED turns on and otherwise it is off. but I only see the LED being HIGH
The D0 pin has connections to the USB to serial chip on the Uno and so is pulled high by that chip normally. Try using another pin, but not pin1 as that has the same sort of problem but any. Of the others should work.