Control Arduino

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 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.

3 Likes