# Serial communication between Mac and micro:bit

**URL:** <https://discourse.processing.org/t/serial-communication-between-mac-and-micro-bit/34543>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [January 9, 2022, 3:44pm UTC](https://discourse.processing.org/t/serial-communication-between-mac-and-micro-bit/34543 "2022-01-09T15:44:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincent\_Fung](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@Vincent\_Fung](https://discourse.processing.org/u/Vincent_Fung)\
**Post date:** [January 9, 2022, 3:44pm UTC](https://discourse.processing.org/t/serial-communication-between-mac-and-micro-bit/34543/1 "2022-01-09T15:44:43Z")

</div>

> please format code with \</\> button \* [homework policy](https://discourse.processing.org/faq/#homework) \* [asking questions](https://discourse.processing.org/t/2147)

can someone pls guide me to do something similar to this…

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/6/670e95dc9c086e516209ebb30ac7f46cbb592fc3.png)

It seems the highlighted one program is ok for window’s laptop but not for Mac. What should change so as to facilitate communication between [p5.js] running in your browser and a micro:bit?

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [January 9, 2022, 6:54pm UTC](https://discourse.processing.org/t/serial-communication-between-mac-and-micro-bit/34543/2 "2022-01-09T18:54:30Z")

</div>

line 33 should give you a list of serial ports for the Mac. Choose the correct one and insert that text for the portName in line 12.

---

<div class="post-metadata">

**Author:** ![Vincent\_Fung](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@Vincent\_Fung](https://discourse.processing.org/u/Vincent_Fung)\
**Post date:** [January 10, 2022, 12:57am UTC](https://discourse.processing.org/t/serial-communication-between-mac-and-micro-bit/34543/3 "2022-01-10T00:57:48Z")

</div>

thank you for your reply, but where can I find the list of serial ports for the Mac?

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [January 10, 2022, 4:07am UTC](https://discourse.processing.org/t/serial-communication-between-mac-and-micro-bit/34543/4 "2022-01-10T04:07:00Z")

</div>

I was hoping p5 would list them for you with the code on line 33. But if that doesn’t work, try typing **ls /dev/cu.** \* on the command line in Terminal. There is a space after ls.
