sterretje:
Get rid of String (capital S) and use one of the approaches in serial input basics - updated to directly get data into a character array.
Does this still work if I'm using Processing to extract data from a JSON file?
UKHeliBob: toCharArray() - Arduino Reference
You could, of course, work with char arrays in your program to avoid the need to convert from String to string
char_array[0] is the first element of char_array
char_array[1] is the second element of char_array
The first element is '0', the second element is 'x'.
Serial communication has no idea about how the data is created (String, binary stuff, character array). So yes, the Serial Input Basics - updated thread will work; even contains an example how to parse (split) the data.
sterretje:
char_array[0] is the first element of char_array
char_array[1] is the second element of char_array
Serial communication has no idea about how the data is created (String, binary stuff, character array). So yes, the Serial Input Basics - updated thread will work; even contains an example how to parse (split) the data.
I looked at the thread and have no idea how to even start...
I'm very new to Arduino..
Is there no easier way?
Processing sends data over Serial "0xB20000 0x45cfc9 0x95b8e3"
Arduino strings them into str and then does more to process them in such a way that