# How to use serial communication from an extension?

**URL:** <https://forum.makecode.com/t/how-to-use-serial-communication-from-an-extension/825>\
**Category:** micro:bit\
**Created:** [November 28, 2019, 2:36pm UTC](https://forum.makecode.com/t/how-to-use-serial-communication-from-an-extension/825 "2019-11-28T14:36:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gbraad](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gbraad/32/338_2.png) [@gbraad](https://forum.makecode.com/u/gbraad)\
**Post date:** [November 28, 2019, 2:36pm UTC](https://forum.makecode.com/t/how-to-use-serial-communication-from-an-extension/825/1 "2019-11-28T14:36:36Z")

</div>

I have an external board that relies on a serial communication. When I use the micro:bit with redirect I can communicate with this board. So as a next step I wanted to create an extension for re-use. However, how can I address the serial connection?

I have an initialize function, but either using `serial` (as namespace) or `Serial` as a device aren’t recognized. What do I need to do before I can use `createSerial` ?

---

<div class="post-metadata">

**Author:** ![gbraad](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gbraad/32/338_2.png) [@gbraad](https://forum.makecode.com/u/gbraad)\
**Post date:** [November 28, 2019, 3:04pm UTC](https://forum.makecode.com/t/how-to-use-serial-communication-from-an-extension/825/2 "2019-11-28T15:04:31Z")

</div>

Think I got something. Will try and get back here …

For the moment I will use `serial.redirect` inside the extension to do what I want, but this would limit to a single serial device and renders external debugging useless.

This worked: [https://makecode.microbit.org/\_cMyaLHX38ejD](https://makecode.microbit.org/_cMyaLHX38ejD) but as stated, this seems to limit the use to a single serial device.
