Problem with serial monitor

Hello,
I have a problem with the serial monitor in a program.
When I use It, It doesn't do anything I said.
For examples: I active and it does not incorporate what I write. I command " 6 " but he does not make me see anything

the sketch is too long, so I paste It here: ControlC Pastebin - The easiest way to host your text


I write "6"

I send the message "6"

Nothing's happened

And you set your serial line speed to . . . what, exactly?

I note also that despite being told not to, you're still using pin 1.

BTW, your sketch is roughly ten times as long as it needs to be.

Why would you expect to "see" that? What does your arduino do with the 6 once it recieves it?

The "6" was only an example.
My problem is I can't use the serial monitor, because i don't know!
I write the command but It doesn't work

AWOL:
I note also that despite being told not to, you're still using pin 1.

What? Where? O.o

Anyway, my problem is that serial monitor doesn't work

You need Serial.begin( someBaudRate) in your sketch.

(replace "someBaudRate" with your favourite flavour).

epicmovie:
What? Where? O.o

In your other thread about this code.

Anyway, my problem is that serial monitor doesn't work

That's just a silly conclusion on your part. Your problem has already been pointed out.

epicmovie:

epicmovie:
I note also that despite being told not to, you're still using pin 1.

What? Where? O.o

#define BS 1  <<Remember this number ONE
...
...

void setup (){
...
pinMode (BS,OUTPUT);  <<What does  BS hold?  (that's right pin 1)
...

void loop(){
...
...
digitalWrite(BS,LOW); <<What pin are you writing to here (that's right pin 1)
...
...
digitalWrite(BS,LOW);<< Guess what's wrong with this
...
...

Well, so i could say
pinMode (1,OUTPUT)
Without declaring "#define BS 1"?

Yes, you could say that, but you'd still be using half of the serial interface.
Your choice.

epicmovie:
Well, so i could say
pinMode (1,OUTPUT)
Without declaring "#define BS 1"?

From AWOLS reply (see #2) you've been told this before but, in case you missed it. Pin 1 is used by Serial.

Every time you send something over Serial (using Serial.print or Serial.write) you are sending bits out through Pin 1.

Every time you do a digitalWrite to pin 1 you are potentially interrupting the data stream being sent out by Serial.

You can do EITHER without a problem, but using Serial.prints AND digitalWrites to pin 1 will result in both processes being unreliable.

AWOL:
BTW, your sketch is roughly ten times as long as it needs to be.

I wondered why he linked to that site, instead of a github upload or something. I wonder if it's due to this policy this site has: "Binbox is the first get paid as you share monetization program." ...

Edit: Just thinking out loud - would he be better off using a switch case instead of those if / else ifs?

That's dirty. :smiling_imp: I wonder how much it pays. You could run that game on forums all over the net.

Delta_G:
That's dirty. :smiling_imp: I wonder how much it pays. You could run that game on forums all over the net.

Not only that, the Captcha is really annoying. I almost gave up because it took a while to load - and just screamed spyware to me. ...but I wanted to see if I could help, so it got the best of me. :confused:

I don't have an account on Binbox, lol

anyway,

KenF:
Every time you send something over Serial (using Serial.print or Serial.write) you are sending bits out through Pin 1.

Every time you do a digitalWrite to pin 1 you are potentially interrupting the data stream being sent out by Serial.

You can do EITHER without a problem, but using Serial.prints AND digitalWrites to pin 1 will result in both processes being unreliable.

So, what have i to modify?

epicmovie:
I don't have an account on Binbox, lol

And yet you sent us there to get your code.

epicmovie:
anyway, So, what have i to modify?

Where you put the code. Nobody is going to go to binbox to get it. Especially now that we know what that is. If you want us to see the code, post it or attach it.