# Control Arduino

**URL:** <https://discourse.julialang.org/t/control-arduino/29982>\
**Category:** General Usage\
**Tags:** arduino\
**Created:** [October 16, 2019, 1:13pm UTC](https://discourse.julialang.org/t/control-arduino/29982 "2019-10-16T13:13:21Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ssfrr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ssfrr/32/3736_2.png) [@ssfrr](https://discourse.julialang.org/u/ssfrr)\
**Post date:** [October 16, 2019, 2:25pm UTC](https://discourse.julialang.org/t/control-arduino/29982/4 "2019-10-16T14:25:11Z")

</div>

The most common way to communicate with an arduino from a PC is over UART(AKA serial), not SPI. The Arduino has a USB-to-serial chip so when you plug it in it shows up as a serial port. You should be able to open up that serial port (e.g. `/dev/ttyUSB0` or similar) and use `read` and `write` to communicate with the Arduino using its [Serial](https://www.arduino.cc/reference/en/language/functions/communication/serial/) class.

So you’d write an Arduino sketch that receives data over UART and controls the LEDs, and then write Julia code that sends the correct data over UART.

---

_[View the full topic](https://discourse.julialang.org/t/control-arduino/29982)._
