# How do you use the Electron's extra serials in code?

**URL:** <https://community.particle.io/t/how-do-you-use-the-electrons-extra-serials-in-code/26766>\
**Category:** Getting Started\
**Created:** [October 25, 2016, 11:14pm UTC](https://community.particle.io/t/how-do-you-use-the-electrons-extra-serials-in-code/26766 "2016-10-25T23:14:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![unseenshadow2](https://avatars.discourse-cdn.com/v4/letter/u/3bc359/32.png) [@unseenshadow2](https://community.particle.io/u/unseenshadow2)\
**Post date:** [October 25, 2016, 11:14pm UTC](https://community.particle.io/t/how-do-you-use-the-electrons-extra-serials-in-code/26766/1 "2016-10-25T23:14:11Z")

</div>

I’ve recently purchased a Particle Electron for a project that requires 1 to 2 serials (aside from the USB serial). However, I am unaware of how to control these Serials. The particular ones that I am looking to use are [UART4 and UART5](https://docs.particle.io/assets/images/electron/illustrations/electron_pinout.pdf). The closer that I can use them in comparison to Serial, the better.

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [October 25, 2016, 11:16pm UTC](https://community.particle.io/t/how-do-you-use-the-electrons-extra-serials-in-code/26766/2 "2016-10-25T23:16:26Z")

</div>

All you need to do is:

```auto
#include "Serial4/Serial4.h"
#include "Serial5/Serial5.h"

```

and use the `Serial4` or `Serial5` object instead of `Serial`.

[https://docs.particle.io/reference/firmware/electron/#serial](https://docs.particle.io/reference/firmware/electron/#serial)

That’s it!

---

<div class="post-metadata">

**Author:** ![unseenshadow2](https://avatars.discourse-cdn.com/v4/letter/u/3bc359/32.png) [@unseenshadow2](https://community.particle.io/u/unseenshadow2)\
**Post date:** [October 25, 2016, 11:48pm UTC](https://community.particle.io/t/how-do-you-use-the-electrons-extra-serials-in-code/26766/3 "2016-10-25T23:48:58Z")

</div>

Thank you, that is exactly what I needed.
