Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SoftSerial SDFileSystem mbed wave_player
main.cpp
- Committer:
- thoma@THOMAS-CAUWELIER.khbo.be
- Date:
- 2017-05-02
- Revision:
- 3:f128424d2e80
- Parent:
- 1:6b839581dc9f
- Child:
- 4:a07612fbf279
File content as of revision 3:f128424d2e80:
#include "mbed.h" int main() { printf("%s", "hello, term"); } /** A serial port (UART) for communication with other serial devices * * Can be used for Full Duplex communication, or Simplex by specifying * one pin as NC (Not Connected) * * This uses software serial emulation, regular serial pins are alot better, * however if you don't have spare ones, you can use this. It is advicable * to put the serial connection with highest speed to hardware serial. * * If you lack RAM memory you can also use SoftSerial without this buffer around it. * In that case it is fully blocking. * * Example: * @code * #include "mbed.h" * #include "BufferedSoftSerial.h" * * SoftSerial block(USBTX, USBRX); * BufferedSoftSerial buf(USBTX, USBRX); * * int main() * { * while(1) { * Timer s; * * s.start(); * buf.printf("Hello World - buffered\r\n"); * int buffered_time = s.read_us(); * wait(0.1f); // give time for the buffer to empty * * s.reset(); * block.printf("Hello World - blocking\r\n"); * int polled_time = s.read_us(); * s.stop(); * wait(0.1f); // give time for the buffer to empty * * buf.printf("printf buffered took %d us\r\n", buffered_time); * buf.printf("printf blocking took %d us\r\n", polled_time); * wait(5); * } * } **/