Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <string.h>
  2.  
  3. void setup() {
  4. // put your setup code here, to run once:
  5. Serial.begin(9600);
  6. }
  7.  
  8. void test1(char * ids){
  9. char * pch = strtok(ids,",");
  10. while(pch != NULL) {
  11. Serial.println(pch);
  12. pch = strtok(NULL,",");
  13. }
  14. Serial.println("---");
  15. delay(2000);
  16. }
  17.  
  18. void loop() {
  19. char * ids = "9,5,0,1,8,6";
  20. test1(ids);
  21. char * ids1 = "9,5,0,1,8,6";
  22. test1(ids1);
  23. char * ids2 = "9,5,0,1,8,6";
  24. test1(ids2);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement