I am new User and i am realy need help to understand(Examples)

I tried to use the example of DigitalReadSerial the problem is when i see the output on the serial monitor it gives me multiple of zeros then multiple of ones without giving any signal to the arduino without doing anything it gives zeros and ones so what shall i do for example if i want to read the signal coming to the arduino five times then make the output go on Led for example or run dc motor ?

thanks in advance

We can't see your code. We can't see your serial data. We can't see what your problem is, if any.

If I understand your question, you're expecting something back from serial? That example doesn't read serial input... it reads the button on the pin, and sends that 0 or 1 to the serial interface which displays on the monitor as you saw. But it doesn't send anything back.

Another floating pin question?

It would help to understand your problem if you explain what you think the example program should do.

...R

the code is the original code of the examples the problem without pressing on the push button it give in the serial monitor 0000000000 the 111111111 the 0000000 although i didnt press on the push button

Tell us exactly how you wiring up your push button as that is the most likely source of your problem.

Lefty

At the top of this section there are a couple of topics in bold.
You might want to take a look at them.

You've got a floating pin.
But that's just a guess because you haven't posted code or a schematic.

Well asking him to post the code of an arduino IDE example sketch is probably more a statement made from habit then actually required? :wink:

Lefty

is probably more a statement made from habit then actually required?

No, you never know whether or not it has been cut and pasted, or transcribed by someone who misspells "really" :wink:

AWOL:

is probably more a statement made from habit then actually required?

No, you never know whether or not it has been cut and pasted, or transcribed by someone who misspells "really" :wink:

Pfff :wink: