Wyatt Hepler | f9fb90f | 2020-09-30 18:59:33 -0700 | [diff] [blame] | 1 | .. _module-pw_sys_io_arduino: |
Anthony DiGirolamo | 9147aa0 | 2020-09-22 10:41:05 -0700 | [diff] [blame] | 2 | |
Anthony DiGirolamo | eea0d77 | 2020-08-06 12:00:36 -0700 | [diff] [blame] | 3 | ----------------- |
| 4 | pw_sys_io_arduino |
| 5 | ----------------- |
| 6 | |
| 7 | ``pw_sys_io_arduino`` implements the ``pw_sys_io`` facade over |
| 8 | `Arduino's Serial interface <https://www.arduino.cc/reference/en/language/functions/communication/serial/>`_. |
Anthony DiGirolamo | 9147aa0 | 2020-09-22 10:41:05 -0700 | [diff] [blame] | 9 | |
| 10 | On initialization it runs Arduino's first ``Serial`` interface at a 115200 baud |
| 11 | rate: |
| 12 | |
| 13 | .. code-block:: cpp |
| 14 | |
| 15 | Serial.begin(115200); |
| 16 | |
| 17 | // Wait for serial port to be available |
| 18 | while (!Serial) { |
| 19 | } |
| 20 | |
| 21 | After ``Serial.begin(115200)`` it will busy wait until a host connects to the |
| 22 | serial port. |
| 23 | |
| 24 | .. seealso:: |
Wyatt Hepler | f9fb90f | 2020-09-30 18:59:33 -0700 | [diff] [blame] | 25 | - :ref:`target-arduino` target documentation for a list of working hardware. |
| 26 | - :ref:`module-pw_arduino_build` for caveats when running Pigweed on top of |
Anthony DiGirolamo | 9147aa0 | 2020-09-22 10:41:05 -0700 | [diff] [blame] | 27 | the Arduino API. |