Arduino IDE on the Rapsberry Pi

As part of my experiments with tworse (the Twitter to Morse project) I needed to install the Arduino IDE on a Raspberry Pi and use it to upload a sketch to a Shrimp. The Shrimp is a low-cost Arduino clone which uses a CP2102 as its programmer.

To my surprise and delight everything just worked out of the box. A couple of people have asked me what I did.

Here's what:

Installing the IDE

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install arduino

Since I normally work at the command line, I needed to fire up X-windows

startx

The menu included a category electronics, and the Arduino IDE was located there.

Uploading a sketch

Shrimp and Pi
I started up the IDE with the Shrimp plugged into a USB port.

I configured the IDE to use the appropriate board type (normally Arduino UNO for a Shrimp) and selected /dev/ttyUSB0 as the port.

I opened and uploaded the examples/blink sketch. The IDE compiled it (which took about a minute) and uploaded it successfully. Then I watched the blinkenlight, as Liz Upton would say :)

Update

This morning I repeated my experiment with an Arduino Uno. Everything worked without problem. The only difference was that I needed to select /dev/ttyACM0 as my port in the IDE.

One thing I forgot to mention yesterday: on the Pi I used, the pi account was a member of the dialout group, which I suspect is a requirement.



Comments

Popular posts from this blog

Controlling a Raspberry Pi Pico remotely using PySerial

Five steps to connect Jetson Nano and Arduino

Raspberry Pi Pico project 2 - MCP3008