Using SoftwareSerial library

Hello
I have this weirdness with the library
When used this way....
while(bluetooth.available()<1) {} // wait for input
i = bluetooth.parseInt(); // get int
bluetooth.print(i); // send out int
delay(100); // wait before continuing

it doesn't wait for input i doesn't get a value and falls through everything else
but if I leave out < bluetooth.print(i); >
it waits for input and i gets a value everything works after

any ideas on why this is so?

I'm using an Arduino nano for this

Why are you doing such wierdness with Bluetooth? Did you follow the examples?

SoftwareSerial can not transmit and receive at the same time, that may be causing your problem.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.