Pages: [1]   Go Down
Author Topic: Sending text to the arduino  (Read 397 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, I am pretty new to the arduino, so maybe this is really simple, but I want to make sure.

Im trying to make the arduino turn on a led when there is a specific update on a twitter account.

Right now I made it work when the update is just one character, but I am not able to make it work with more than that.

Is there a way to check the if statement vs the whole string on the serial.read? does the serial.read just reads the first byte?

Thanks in advance!
Y!
Logged

London, England
Offline Offline
Edison Member
*
Karma: 4
Posts: 1026
Go! Go! Arduinoooo !!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Seria.read reads in one byte at a time. You will need to load those bytes into a buffer until you reach the end of your string, then process that buffer as a whole string/sentence accordingly.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks a lot I will try that!
Logged

Pages: [1]   Go Up
Jump to: