Skip to main content
2 of 3
added 130 characters in body
dda
  • 1.6k
  • 1
  • 12
  • 18
if(data !='n')

This should be

if(data !='\n')

NEXT.

data=Serial.read();

only reads ONE character. You should add to a buufer, not assign a single character.

dda
  • 1.6k
  • 1
  • 12
  • 18