https://github.com/dyadica/serial_string_parse
https://github.com/dyadica/serial_string_parse
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dyadica/serial_string_parse
- Owner: dyadica
- Created: 2014-04-13T11:50:39.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-04-13T11:55:16.000Z (about 11 years ago)
- Last Synced: 2025-01-21T19:26:26.318Z (6 months ago)
- Language: Arduino
- Homepage: http://www.dyadica.co.uk/journal/simple-serial-string-parsing/
- Size: 137 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Serial_String_Parse
===================This repository demonstrates the use of the strtok_r() function to parse an incoming string. This is so that it can be used to call independent functions and set property values. At the heart of the presented code is a function called ParseSerialData() which utilises strtok_r() to separate the received string each time there is a comma “,” present.
Then depending upon how many chunks of data have been identified the function calls one of two (but not limited to) switch statements that are used to determine what we want to do with the received data.
For more information, check out the following blog post:
http://www.dyadica.co.uk/journal/simple-serial-string-parsing/