This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
sdk:sdk [2018/09/18 09:37] juraschek [The Language] |
sdk:sdk [2018/09/18 09:42] juraschek [The Language] |
||
---|---|---|---|
Line 15: | Line 15: | ||
*/ | */ | ||
for ( attempts=0; attempts<3; attempts ++) { | for ( attempts=0; attempts<3; attempts ++) { | ||
- | if ( nb_serial_read ("serial0") == " Knock Knock !") { | + | if ( nb_serial_read ("serial0") == "Knock Knock !") { |
nb_serial_write ("serial0", "Who 's there ?"); | nb_serial_write ("serial0", "Who 's there ?"); | ||
if ( nb_serial_read ("serial0") == " Santa ") { | if ( nb_serial_read ("serial0") == " Santa ") { |