08.11.2017 Views

arduino_básico_Michael_McRoberts

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

94<br />

Arduino Básico<br />

Depois do loop while, temos<br />

splitString(buffer);<br />

Uma chamada a uma das duas funções que você criou com o nome de splitString().<br />

A função se parece com isso:<br />

void splitString(char* data) {<br />

Serial.print("Data entered: ");<br />

Serial.println(data);<br />

char* parameter;<br />

parameter = strtok (data, " ,");<br />

while (parameter != NULL) {<br />

setLED(parameter);<br />

parameter = strtok (NULL, " ,");<br />

}<br />

// Limpa o texto e os buffers seriais<br />

for (int x=0; x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!