9 years, 4 months ago.

Arduino like Serial.find() support in mbed?

http://arduino.cc/en/Serial/Find

It would be nice if this gets implemented. Also, where can I find all the functions applicable to a serial object? Like s.getc s.gets s.scanf etc ?

Question relating to:

For future reference, I hacked it together here: https://os.mbed.com/users/janjongboom/code/arduino-serial-find/

posted by Jan Jongboom 10 Nov 2017

2 Answers

9 years, 4 months ago.

MODSERIAL for example has this option, but you can also add it fairly simple yourself to your own child class.

Most Serial functions are implemented in the Stream class: https://github.com/mbedmicro/mbed/blob/master/libraries/mbed/api/Stream.h (This one is also often used for for example display libraries).

9 years, 4 months ago.

A nice answer was http://developer.mbed.org/questions/1029/pcprintf-a-method/
I hope this help you to "find" all theses functions.